home *** CD-ROM | disk | FTP | other *** search
/ C & C++ Multimedia Cyber Classroom / C and C++ Multimedia Cyber Classroom (Prentice Hall) (1998).iso / cpphtp2 / cpphtp2.jar / preface.gml < prev    next >
Text File  |  1998-03-03  |  103KB  |  2,281 lines

  1. <html>
  2. <chapter>
  3. <section type=Body name=Default title="Preface">
  4. <page>
  5. <font size=18 bold>Preface</font><hr>
  6. Welcome to ANSI/ISO Draft Standard C++! This book 
  7. is by an old guy and a young guy. The old guy (HMD; 
  8. Massachusetts Institute of Technology 1967) has been 
  9. programming and/or teaching programming for 36 
  10. years. The young guy (PJD; MIT 1991) has been 
  11. programming for 15 years and has caught the teaching 
  12. and writing "bug." The old guy programs and teaches 
  13. from experience; the young guy does so from an 
  14. inexhaustible reserve of energy. The old guy wants 
  15. clarity; the young guy wants performance. The old guy 
  16. appreciates elegance and beauty; the young guy wants <br>
  17.  
  18. </page>
  19. <page>
  20. results. We got together to produce a book we hope you 
  21. will find informative, interesting, and entertaining.<br>
  22. These are exciting times in the C++ community with 
  23. the impending approval of the ANSI/ISO C++ Draft 
  24. Standard. ANSI (the American National Standards 
  25. Institute) and ISO (the International Standards 
  26. Organization), have cooperated to develop what will 
  27. soon become one of the most important worldwide 
  28. standards for the computing community. <br>
  29. When we wrote the first edition of<i> C++ How to 
  30. Program</i>, we aimed the book at college-level courses 
  31. which at the time were primarily being taught in Pascal 
  32. or C, emphasizing the procedural programming <br>
  33.  
  34. </page>
  35. <page>
  36. paradigm. Writing a C++ textbook for the Computer 
  37. Science I and II audiences presented a difficult 
  38. challenge to us. We would need to describe two 
  39. programming paradigms, both procedural programming 
  40. (because C++ still includes C) and object-oriented 
  41. programming. This practically doubled the amount of 
  42. material that would need to be presented at the 
  43. introductory level. We chose a strategy of presenting 
  44. the C-like material on primitive data types, control 
  45. structures, functions, arrays, pointers, strings and 
  46. structures in the first five chapters of the book We then 
  47. presented object-oriented programming in Chapters 6 
  48. through 15.<br>
  49.  
  50. </page>
  51. <page>
  52. <i>C++ How to Program</i> became the most widely used 
  53. college-level C++ textbook in the world. We delayed 
  54. writing this new edition for two reasons.<br>
  55. 1. C++ was under active development over this time 
  56. period, with new drafts of the standards document 
  57. appearing on a regular basis, but with no clear signs 
  58. from the standards committee that the draft standard 
  59. was going to be accepted "as is" within a short period 
  60. of time. Even as we go to press in November 1997, 
  61. there are estimates from the standards community that it 
  62. could be as much as a year or more before the current 
  63. draft standard is accepted worldwide.<br>
  64.  
  65. </page>
  66. <page>
  67. 2. We were waiting for a key signal that it was time for 
  68. a new edition of <i>C++ How to Program</i>. That came in 
  69. July 1997 with the publication of Bjarne Stroustrup's 
  70. third edition of his book<i> The C++ Programming 
  71. Language</i>. Stroustrup created C++ and his books are 
  72. the definitive works on the language. At this point, we 
  73. felt that the "new definition" of C++ was sufficiently 
  74. stable for us to publish <i>C++ How to Program: Second 
  75. Edition</i>.<br>
  76. We diverted our attention for a time to produce five 
  77. Java publications: The first and second editions of <i>Java 
  78. How to Program</i>, the first and second editions of our<i> 
  79. Java Multimedia Cyber Classroom</i> interactive learning <br>
  80.  
  81. </page>
  82. <page>
  83. software package for Windows 95/NT and Solaris, and 
  84. the first edition of<i> Java How to Program with an 
  85. Introduction to Visual J++</i> (which was sponsored by 
  86. Microsoft). But the excitement of the impending 
  87. acceptance of the ANSI/ISO C++ Draft Standard drew 
  88. our attention back to C++.<br>
  89.  
  90. </page>
  91. </section>
  92. <section type=Body name=Default title="C++ How to Program: Second Edition">
  93. <page>
  94. <font size=18 bold><i>C++ How to Program: Second Edition
  95. </i></font><hr>
  96. Let us describe for you the process we used to create 
  97. this book. Our computer science editor at Prentice Hall, 
  98. Laura Steele, retained 28 reviewers, including the 
  99. chairperson and several members of the ANSI/ISO C++ 
  100. committee. A dozen of them reviewed the first edition 
  101. as published and made suggestions for improvement, 
  102. especially for bringing the book in line with the 
  103. evolving ANSI/ISO C++ Draft Standard. This process 
  104. resulted in more than 1000 pages of reviews! We then 
  105. wrote the new material addressing the enhancements to 
  106. C++ that were added in the ANSI/ISO C++ Draft <br>
  107.  
  108. </page>
  109. <page>
  110. Standard. We wrote "live-code" examples, ran the 
  111. programs, captured their screen outputs, and wrote the 
  112. accompanying program walkthroughs. Much of this 
  113. material was distributed throughout the 18 chapters of 
  114. the first edition. We then wrote three additional 
  115. chapters: Chapter 19, "Class <b>string</b> and String Stream 
  116. Processing;" Chapter 20, "Standard Template Library 
  117. (STL);" and Chapter 21, "ANSI/ISO C++ Standard 
  118. Language Additions." These chapters were sent to 
  119. reviewers and their comments were carefully 
  120. addressed. The STL chapter, in particular, was reviewed 
  121. by several members of the ANSI/ISO C++ Committee, 
  122. and by the creators of the STL, Alexander Stepanov and <br>
  123.  
  124. </page>
  125. <page>
  126. Meng Lee. C++ is in transition at the time of this 
  127. writing and few compilers are fully up to speed with the 
  128. new ANSI/ISO C++ Draft Standard. We made many 
  129. difficult judgement calls regarding the use of "current 
  130. version" C++ vs. new draft standard C++ features. <br>
  131.  
  132. </page>
  133. </section>
  134. <section type=Body name=Default title="A Revolution in Software Development">
  135. <page>
  136. <font size=18 bold>A Revolution in Software Development</font><hr>
  137. For years hardware has been improving dramatically. 
  138. But software, for some reason, seemed to resist almost 
  139. every attempt to build it faster and to build it better. 
  140. Today we are in the middle of a revolution in the way 
  141. software is being written. That revolution is based on 
  142. the common-sense, hardware notion of standardized, 
  143. interchangeable components, exactly as used by Henry 
  144. Ford in the days of the Model T Ford. These software 
  145. components are called "objects," more properly, 
  146. "classes," which are the "cookie cutters" out of which 
  147. objects are produced.<br>
  148.  
  149. </page>
  150. <page>
  151. The most mature of the well-known object-oriented 
  152. languages is Smalltalk, developed in the early 1970s at 
  153. Xerox's Palo Alto Research Center. But the most 
  154. widely used object-oriented language--by a factor of 
  155. 10 over Smalltalk--is C++ developed by Bjarne 
  156. Stroustrup and others in the early 1980s at AT&T. In the 
  157. time between the publication of the first edition of this 
  158. book and this new second edition, another serious 
  159. contender appeared on the scene--the Java object-
  160. oriented programming language, developed in the early 
  161. 1990s by James Gosling and others at Sun 
  162. Microsystems.<br>
  163.  
  164. </page>
  165. <page>
  166. Why a major new object-oriented programming 
  167. language every 10 years? Smalltalk was truly ahead of 
  168. its time as a research experiment. C++ was right for its 
  169. time and for today's high-performance systems 
  170. programming and applications development needs. 
  171. Java offered developers the ability to create highly 
  172. portable multimedia-intensive, and networking-
  173. intensive Internet/World Wide Web-based applications. <br>
  174.  
  175. </page>
  176. </section>
  177. <section type=Body name=Default title="Procedural Programming, Object-Based Programming, Object-Oriented Programming and Generic Programming">
  178. <page>
  179. <font size=18 bold>Procedural Programming, Object-Based Programming, Object-Oriented Programming 
  180. and Generic Programming</font><hr>
  181. In this book you will master the five key components of 
  182. C++ as well as four contemporary programming 
  183. paradigms (shown in italics in the following five 
  184. points).<br>
  185. <spacer width=16 height=1>1. <i>C procedural programming</i>--Chapters 15 and 16
  186. 18; key topics include data types, control structures, 
  187. functions, arrays, pointers, strings, structures, bit 
  188. manipulation, character manipulation, preprocessing 
  189. and others.<br>
  190.  
  191. </page>
  192. <page>
  193. 2.<i> C++ procedural programming</i> enhancements to C--
  194. Sections 3.153.21; key topics include <b>inline</b> functions, 
  195. references, default arguments, function overloading and 
  196. function templates.<br>
  197. <spacer width=16 height=1>3.<i> C++ object-based programming</i>--Chapters 68; key 
  198. topics include abstract data types, classes, objects, 
  199. encapsulation, information hiding, member access 
  200. control, constructors, destructors, software reusability, 
  201. constant objects and member functions, composition, 
  202. friendship, dynamic memory allocation, <b>static</b> 
  203. members, <b>this</b> pointer and others.<br>
  204. <spacer width=16 height=1>4.<i> C++ object-oriented programming</i>--Chapters 915, 
  205. 19 and 21; key topics include base classes, single <br>
  206.  
  207. </page>
  208. <page>
  209. inheritance, derived classes, multiple inheritance, 
  210. <b>virtual</b> functions, dynamic binding, polymorphism, 
  211. pure <b>virtual</b> functions, abstract classes, concrete 
  212. classes, stream input/output, class templates, exception 
  213. handling, file processing, data structures, strings as full-
  214. fledged objects, data type <b>bool</b>, cast operators, 
  215. namespaces, run-time type information (RTTI), <b>explicit</b> 
  216. constructors and <b>mutable</b> members.<br>
  217. <spacer width=16 height=1>5.<i> C++ generic programming</i>--Chapter 20--the 
  218. largest chapter in the book; key topics include the 
  219. Standard Template Library (STL), templatized 
  220. containers, sequence containers, associative containers, 
  221. container adaptors, iterators that traverse templatized <br>
  222.  
  223. </page>
  224. <page>
  225. containers and algorithms that process the elements of 
  226. templatized containers. <br>
  227.  
  228. </page>
  229. </section>
  230. <section type=Body name=Default title="Evolving from Pascal and C to C++">
  231. <page>
  232. <font size=18 bold>Evolving from Pascal and C to C++</font><hr>
  233. C++ has replaced C as the systems implementation 
  234. language of choice in industry. But C programming will 
  235. continue to be an important and valuable skill for the 
  236. next decade because of the enormous amount of C 
  237. legacy code that must be maintained. Dr. Harvey M. 
  238. Deitel has been teaching introductory programming 
  239. courses in college environments for two decades with 
  240. an emphasis on developing clearly written, well-
  241. structured programs. Much of what is taught in these 
  242. courses is the basic principles of programming with an 
  243. emphasis on the effective use of control structures and <br>
  244.  
  245. </page>
  246. <page>
  247. functionalization. We have presented this material 
  248. exactly the way HMD has done in his college courses. 
  249. There are some pitfalls, but where these occur, we point 
  250. them out and explain procedures for dealing with them 
  251. effectively. Our experience has been that students 
  252. handle the course in about the same manner as they 
  253. handle introductory Pascal or C courses. There is one 
  254. noticeable difference though: Students are highly 
  255. motivated by the fact that they are learning a leading-
  256. edge language (C++) and a leading-edge programming 
  257. paradigm (object-oriented programming) that will be 
  258. immediately useful to them as they leave the college 
  259. environment. This increases their enthusiasm for the <br>
  260.  
  261. </page>
  262. <page>
  263. material--a big help when you consider that C++ is 
  264. more difficult to learn than Pascal or C.<br>
  265. <spacer width=16 height=1>Our goal was clear: Produce a C++ programming 
  266. textbook for introductory college-level courses in 
  267. computer programming for students with little or no 
  268. programming experience, yet offer the depth and the 
  269. rigorous treatment of theory and practice demanded by 
  270. traditional, upper-level C++ courses. To meet these 
  271. goals, we produced a book larger than other C++ 
  272. texts--this because our text also patiently teaches the 
  273. principles of procedural programming, object-based 
  274. programming, object-oriented programming and 
  275. generic programming. Hundreds of thousands of people <br>
  276.  
  277. </page>
  278. <page>
  279. have studied this material in academic courses and 
  280. professional seminars worldwide. <br>
  281.  
  282. </page>
  283. </section>
  284. <section type=Body name=Default title="Introducing Object Orientation from Chapter 1!">
  285. <page>
  286. <font size=18 bold>Introducing Object Orientation from Chapter 
  287. 1!</font><hr>
  288. We faced a difficult challenge in designing this book. 
  289. Should the book present a pure object-oriented 
  290. approach? Or should it present a hybrid approach 
  291. balancing procedural programming with object-
  292. oriented programming?<br>
  293. <spacer width=16 height=1>Many instructors who will teach from this text have 
  294. been teaching procedural programming (probably in C 
  295. or Pascal). C++ itself is not a purely object-oriented 
  296. language. Rather it is a hybrid language that enables <br>
  297.  
  298. </page>
  299. <page>
  300. both procedural programming and object-oriented 
  301. programming.<br>
  302. <spacer width=16 height=1>So we chose the following approach. The first five 
  303. chapters of the book introduce procedural programming 
  304. in C++. They present computer concepts, control 
  305. structures, functions, arrays, pointers and strings. These 
  306. chapters cover the C components of C++ and the C++ 
  307. "procedural enhancements" to C.<br>
  308. <spacer width=16 height=1>We have done something to make these first five 
  309. chapters really unique. At the end of each of these 
  310. chapters, we have included a special section entitled, 
  311. "Thinking About Objects." These sections introduce 
  312. the concepts and terminology of object orientation to <br>
  313.  
  314. </page>
  315. <page>
  316. help students begin familiarizing themselves with what 
  317. objects are and how they behave.<br>
  318. <spacer width=16 height=1>The Chapter 1 "Thinking About Objects" section 
  319. introduces the concepts and terminology of object 
  320. orientation. The sections in Chapters 2 through 5 
  321. present a requirements specification for a substantial 
  322. object-oriented system project, namely building an 
  323. elevator simulator, and carefully guide the student 
  324. through the typical phases of the object-oriented design 
  325. process. These sections discuss how to identify the 
  326. objects in a problem, how to specify the objects' 
  327. attributes and behaviors, and how to specify the 
  328. interactions among objects. By the time the student has <br>
  329.  
  330. </page>
  331. <page>
  332. finished Chapter 5, he or she has completed a careful 
  333. object-oriented design of the elevator simulator and is 
  334. ready--if not eager--to begin programming the 
  335. elevator in C++. Chapters 6 and 7 cover data 
  336. abstraction and classes. These chapters also contain 
  337. "Thinking About Objects" sections that ease students 
  338. through the various stages of programming their 
  339. elevator simulators in C++.<br>
  340.  
  341. </page>
  342. </section>
  343. <section type=Body name=Default title="About this Book">
  344. <page>
  345. <font size=18 bold>About this Book</font><hr>
  346. <i>C++ How to Program</i> contains a rich collection of 
  347. examples, exercises, and projects drawn from many 
  348. fields to provide the student with a chance to solve 
  349. interesting real-world problems. The book concentrates 
  350. on the principles of good software engineering and 
  351. stresses program clarity. We avoid arcane terminology 
  352. and syntax specifications in favor of teaching by 
  353. example.<br>
  354. <spacer width=16 height=1>This book is written by two educators who spend most 
  355. of their time teaching and writing about edge-of-the-
  356. practice programming languages. <br>
  357.  
  358. </page>
  359. <page>
  360. The text places a strong emphasis on pedagogy. For 
  361. example, virtually every new concept of either C++ or 
  362. object-oriented programming is presented in the context 
  363. of a complete, working C++ program immediately 
  364. followed by a window showing the program's output. 
  365. Reading these programs is much like entering and 
  366. running them on a computer. We call this our "live-code 
  367. approach." <br>
  368. <spacer width=16 height=1>Among the other pedagogical devices in the text are a 
  369. set of <i>Objectives</i> and an <i>Outline</i> at the beginning of 
  370. every chapter; <i>Common Programming Errors</i>, <i>Good 
  371. Programming Practices</i>, <i>Performance Tips</i>, <i>Portability 
  372. Tips</i>, <i>Software Engineering Observations</i> and <i>Testing 
  373. </i><br>
  374.  
  375. </page>
  376. <page>
  377. <i>and Debugging Tips</i> enumerated in each chapter and 
  378. summarized at the end of each chapter; comprehensive 
  379. bullet-list-style <i>Summary</i> and alphabetized <i>Terminology</i> 
  380. sections in each chapter; <i>Self-Review Exercises and 
  381. Answers</i> in each chapter; and the richest collection of 
  382. <i>Exercises</i> in any C++ book.<br>
  383. <spacer width=16 height=1>The exercises range from simple recall questions to 
  384. lengthy programming problems to major projects. 
  385. Instructors requiring substantial term projects will find 
  386. many appropriate problems listed in the exercises for 
  387. Chapters 3 through 21. We have put a great deal of 
  388. effort into the exercises to enhance the value of this 
  389. course for the student. <br>
  390.  
  391. </page>
  392. <page>
  393. In writing this book, we have used a variety of C++ 
  394. compilers running on Sun SPARC stations and IBM PC 
  395. compatibles (Borland(r) C++ Builder(tm), Microsoft(r) 
  396. Visual C++(r) 5.0 and Metrowerks(r) CodeWarrior 
  397. Professional(r)). For the most part, the programs in the 
  398. text will work on all these compilers with little or no 
  399. modification. We published the versions we developed 
  400. on Microsoft Visual C++ (with a few exceptions that 
  401. are noted in the text).<br>
  402. <spacer width=16 height=1>This text is based on the C++ programming language as 
  403. defined by <i>Working Paper for Draft Proposed 
  404. International Standard for Information Systems--
  405. </i><br>
  406.  
  407. </page>
  408. <page>
  409. <i>Programming Language C++</i>. Approval and technical 
  410. development work is being conducted by Accredited 
  411. Standards Committee X3, Information Technology and 
  412. its Technical Committee X3J16, Programming 
  413. Language C++, respectively. For further details, 
  414. contact: <br>
  415. <font size=6><br></font><indent width=16><font size=14><i>X3 Secretariat</i></font></indent><font size=6><br></font>
  416. <font size=6><br></font><indent width=16><font size=14><i>1250 Eye Street NW</i></font></indent><font size=6><br></font>
  417. <font size=6><br></font><indent width=16><font size=14><i>Washington DC 20005.</i></font></indent><font size=6><br></font>
  418. This text is also based on the C programming language 
  419. as defined by The <i>American National Standard for 
  420. Programming Languages--C</i>: ANSI/ISO 9899-1990, <br>
  421.  
  422. </page>
  423. <page>
  424. Copyright 1990 by International Organization for 
  425. Standardization. Copies may be purchased directly 
  426. from The American National Standards Institute, 11 
  427. West 42nd Street, New York, NY 10036, Telephone: 
  428. (212) 642-4900, Fax: (212) 398-0023, <b>http://
  429. www.ansi.org</b>.<br>
  430. <spacer width=16 height=1>The serious programmer should read these documents 
  431. carefully and reference them regularly. These 
  432. documents are not tutorials. Rather they define C++ and 
  433. C with the extraordinary level of precision that 
  434. compiler implementors and "heavy-duty" developers 
  435. demand.<br>
  436.  
  437. </page>
  438. <page>
  439. We have carefully audited our presentation against 
  440. these documents. Our book is intended to be used at the 
  441. introductory and intermediate levels. We have not 
  442. attempted to cover every feature discussed in these 
  443. comprehensive documents.<br>
  444. <font size=18><b>Objectives
  445. </b></font><br>
  446. Each chapter begins with a statement of objectives. 
  447. This tells the student what to expect and gives the 
  448. student an opportunity, after reading the chapter, to 
  449. determine if he or she has met these objectives. It is a 
  450. confidence builder and a source of positive 
  451. reinforcement.<br>
  452.  
  453. </page>
  454. <page>
  455. <font size=18><b>Quotations
  456. </b></font><br>
  457. The learning objectives are followed by a series of 
  458. quotations. Some are humorous, some are philosophical 
  459. and some offer interesting insights. Our students enjoy 
  460. relating the quotations to the chapter material. You may 
  461. appreciate some of the quotations more <i>after</i> reading 
  462. the chapters. <br>
  463. <font size=18><b>Outline
  464. </b></font><br>
  465. The chapter outline helps the student approach the 
  466. material in top-down fashion. This, too, helps students 
  467. anticipate what is to come and set a comfortable and 
  468. effective learning pace. <br>
  469.  
  470. </page>
  471. <page>
  472. <font size=18><b>Sections
  473. </b></font><br>
  474. Each chapter is organized into small sections that 
  475. address key areas. We prefer a large number of small 
  476. sections.<br>
  477. <font size=18><b>10,660 Lines of Code in 248 Example Programs 
  478. (with Program Outputs)
  479. </b></font><br>
  480. C++ features are presented in the context of complete, 
  481. working C++ programs. Each program is immediately 
  482. followed by a window containing the output produced 
  483. when the program is run. This enables the student to 
  484. confirm that the programs run as expected. Relating 
  485. outputs back to the program statements that produce 
  486. those outputs is an excellent way to learn and reinforce <br>
  487.  
  488. </page>
  489. <page>
  490. concepts. Our programs exercise the diverse features of 
  491. C++. Reading the book carefully is much like entering 
  492. and running these programs on a computer.<br>
  493. <font size=18><b>152 Illustrations/Figures
  494. </b></font><br>
  495. An abundance of charts and line drawings is included. 
  496. The discussion of control structures in Chapter 3 
  497. features carefully drawn flowcharts. (Note: We do not 
  498. teach the use of flowcharting as a program development 
  499. tool, but we do use brief flowchart-oriented 
  500. presentation to specify the precise operation of C++'s 
  501. control structures.) Chapter 15, "Data Structures," uses 
  502. line drawings to illustrate the creation and maintenance <br>
  503.  
  504. </page>
  505. <page>
  506. of linked lists, queues, stacks, and binary trees. The rest 
  507. of the book is abundantly illustrated.<br>
  508. <font size=18><b>621 Programming Tips</b> </font><br>
  509. We have included six design elements to help students 
  510. focus on important aspects of program development, 
  511. testing and debugging, performance, and portability. 
  512. We highlight hundreds of these tips in the form of <i>Good 
  513. Programming Practices</i>, <i>Common Programming 
  514. Errors</i>, <i>Performance Tips</i>, <i>Portability Tips</i>, <i>Software 
  515. Engineering Observations</i> and <i>Testing and Debugging 
  516. Tips</i>. These tips and practices represent the best we 
  517. have been able to glean from a combined five decades 
  518. of programming and teaching experience. One of our <br>
  519.  
  520. </page>
  521. <page>
  522. students--a mathematics major--told us recently that 
  523. she feels this approach is somewhat like the 
  524. highlighting of axioms, theorems, and corollaries in 
  525. mathematics books; it provides a basis on which to 
  526. build good software.<br>
  527. <font size=18><b>115 Good Programming Practices
  528. </b></font><br>
  529. <i>Good Programming Practices</i> are highlighted in the 
  530. text. They call the student's attention to techniques that 
  531. help produce better programs. When we teach 
  532. introductory courses to nonprogrammers, we state that 
  533. the "buzzword" of the course is "clarity," and we tell 
  534. the students that we will highlight (in these <i>Good 
  535. Programming Practices</i>) techniques for writing <br>
  536.  
  537. </page>
  538. <page>
  539. programs that are clearer, more understandable and 
  540. more maintainable.<br>
  541. <font size=18><b>210 Common Programming Errors
  542. </b></font><br>
  543. Students learning a language--especially in their first 
  544. programming course--tend to make certain kinds of 
  545. errors frequently. Focusing the students' attention on 
  546. these <i>Common Programming Errors</i> helps the student 
  547. avoid making the same errors. It also helps reduce the 
  548. long lines outside instructors' offices during office 
  549. hours! Some of these errors are not so common, but we 
  550. did not want to add another tip category.<br>
  551.  
  552. </page>
  553. <page>
  554. <font size=18><b>88 Performance Tips
  555. </b></font><br>
  556. In our experience, teaching students to write clear and 
  557. understandable programs is by far the most important 
  558. goal for a first programming course. But students want 
  559. to write the programs that run the fastest, use the least 
  560. memory, require the smallest number of keystrokes, or 
  561. dazzle in other nifty ways. Students really care about 
  562. performance. They want to know what they can do to 
  563. "turbo charge" their programs. So we have include 
  564. <i>Performance Tips</i> to highlight opportunities for 
  565. improving program performance.<br>
  566.  
  567. </page>
  568. <page>
  569. <font size=18><b>35 Portability Tips
  570. </b></font><br>
  571. Software development is a complex and expensive 
  572. activity. Organizations that develop software must often 
  573. produce versions customized to a variety of computers 
  574. and operating systems. So there is a strong emphasis 
  575. today on portability, i.e., on producing software that 
  576. will run on a variety of computer systems with few, if 
  577. any, changes. Many people tout C++ as an appropriate 
  578. language for developing portable software, especially 
  579. because of C++'s close relationship to ANSI/ISO C and 
  580. the fact that the ANSI/ISO C++ Draft Standard will 
  581. soon be accepted as the global C++ standard. Some 
  582. people assume that if they implement an application in <br>
  583.  
  584. </page>
  585. <page>
  586. C++, the application will automatically be portable. 
  587. This is simply not the case. Achieving portability 
  588. requires careful and cautious design. There are many 
  589. pitfalls. We include numerous <i>Portability Tips</i> to help 
  590. students write portable code.<br>
  591. <font size=18><b>147 Software Engineering Observations
  592. </b></font><br>
  593. The object-oriented programming paradigm requires a 
  594. complete rethinking about the way we build software 
  595. systems. C++ is an effective language for performing 
  596. good software engineering. The <i>Software Engineering 
  597. Observations</i> highlight techniques, architectural issues, 
  598. and design issues, etc. that affect the architecture and 
  599. construction of software systems, especially large-scale <br>
  600.  
  601. </page>
  602. <page>
  603. systems. Much of what the student learns here will be 
  604. useful in upper-level courses and in industry as the 
  605. student begins to work with large, complex real-world 
  606. systems<br>
  607. <font size=18><b>26 Testing and Debugging Tips
  608. </b></font><br>
  609. This "tip type" may be misnamed. When we decided to 
  610. incorporate <i>Testing and Debugging Tips</i> into this new 
  611. edition, we thought these tips would be suggestions for 
  612. testing programs to expose bugs and suggestions for 
  613. removing those bugs. In fact, most of these tips tend to 
  614. be observations about capabilities and features of C++ 
  615. that prevent bugs from getting into programs in the first 
  616. place. <br>
  617.  
  618. </page>
  619. <page>
  620. <font size=18><b>Summary
  621. </b></font><br>
  622. Each chapter ends with additional pedagogical devices. 
  623. We present an extensive, bullet-liststyle <i>Summary</i> of 
  624. the chapter. This helps the student review and reinforce 
  625. key concepts. There is an average of 38 summary 
  626. bullets per chapter.<br>
  627. <font size=18><b>Terminology
  628. </b></font><br>
  629. We include a <i>Terminology</i> section with an alphabetized 
  630. list of the important terms defined in the chapter--
  631. again, further confirmation. There is an average of 66 
  632. terms per chapter.<br>
  633.  
  634. </page>
  635. <page>
  636. <font size=18><b>Summary of Tips, Practices, and Errors
  637. </b></font><br>
  638. We collect and list from the chapter the <i>Good 
  639. Programming Practices</i>, <i>Common Programming 
  640. Errors</i>, <i>Performance Tips</i>, <i>Portability Tips</i>, <i>Software 
  641. Engineering Observations</i> and<i> Testing and Debugging 
  642. Tips</i>.<br>
  643. <font size=18><b>559 Self-Review Exercises and Answers (Count 
  644. Includes Separate Parts)
  645. </b></font><br>
  646. Extensive <i>Self-Review Exercises</i> and <i>Answers to Self-
  647. Review Exercises</i> are included for self-study. This gives 
  648. the student a chance to build confidence with the 
  649. material and prepare to attempt the regular exercises.<br>
  650.  
  651. </page>
  652. <page>
  653. <font size=18><b>862 Exercises (Count Includes Separate Parts; 1421 
  654. Total Exercises)
  655. </b></font><br>
  656. Each chapter concludes with a substantial set of 
  657. exercises including simple recall of important 
  658. terminology and concepts; writing individual C++ 
  659. statements; writing small portions of C++ functions and 
  660. classes; writing complete C++ functions, classes, and 
  661. programs; and writing major term projects. The large 
  662. number of exercises enables instructors to tailor their 
  663. courses to the unique needs of their audiences and to 
  664. vary course assignments each semester. Instructors can 
  665. use these exercises to form homework assignments, 
  666. short quizzes, and major examinations. <br>
  667.  
  668. </page>
  669. <page>
  670. <font size=18><b>500-page Instructor's Manual with Solutions to the 
  671. Exercises
  672. </b></font><br>
  673. The solutions for the exercises are included in the 
  674. <i>Instructor's Manual</i> and on the disks <i>available only to 
  675. instructors</i> through their Prentice-Hall representatives. 
  676. <b>[NOTE: Please do not write to us requesting the 
  677. instructor's manual. Distribution of this publication 
  678. is strictly limited to college professors teaching from 
  679. the book. Instructors may obtain the solutions 
  680. manual only from their regular Prentice Hall 
  681. representatives.] </b>Solutions to approximately half of 
  682. the exercises are included on the <i>C & C++ Multimedia 
  683. Cyber Classroom: Second Edition </i>CD (available March <br>
  684.  
  685. </page>
  686. <page>
  687. 1998 in bookstores and computer stores; please see the 
  688. last few pages of this book for ordering instructions).<br>
  689. <font size=18>4372 Index Entries (Total of 7801 Counting Multiple References)  </font><br>
  690. We have included an extensive <i>Index</i> at the back of the 
  691. book. This helps the student find any term or concept 
  692. by keyword. The <i>Index</i> is useful to people reading the 
  693. book for the first time and is especially useful to 
  694. practicing programmers who use the book as a 
  695. reference. Most of the terms in the <i>Terminology</i> 
  696. sections appear in the <i>Index</i> (along with many more 
  697. index items from each chapter). Thus, the student can 
  698. use the <i>Index</i> in conjunction with the <i>Terminology</i> <br>
  699.  
  700. </page>
  701. <page>
  702. sections to be sure he or she has covered the key 
  703. material of each chapter.<br>
  704.  
  705. </page>
  706. </section>
  707. <section type=Body name=Default title="A Tour of the Book">
  708. <page>
  709. <font size=18 bold>A Tour of the Book</font><hr>
  710. The book is divided into several major parts. The first 
  711. part, Chapters 1 through 5, presents a thorough 
  712. treatment of procedural programming in C++ including 
  713. data types, input/output, control structures, functions, 
  714. arrays, pointers, and strings.<br>
  715. <spacer width=16 height=1>The second part, Chapters 6 through 8, presents a 
  716. substantial treatment of data abstraction with classes, 
  717. objects, and operator overloading. This section might 
  718. effectively be called, "Programming with Objects."<br>
  719.  
  720. </page>
  721. <page>
  722. The third part, Chapters 9 and 10, presents inheritance, 
  723. virtual functions, and polymorphism--the root 
  724. technologies of true object-oriented programming.<br>
  725. <spacer width=16 height=1>The fourth part, chapters 11 and 14, presents C++-style 
  726. stream-oriented input/output including using stream I/O 
  727. with the keyboard, the screen, files, and character 
  728. arrays; both sequential file processing and direct-access 
  729. (i.e., random access) file processing are discussed.<br>
  730. <spacer width=16 height=1>The fifth part, Chapters 12 and 13, discusses two of the 
  731. more recent major additions to C++, namely templates 
  732. and exception handling. Templates, also called 
  733. parameterized types, encourage software reusability. 
  734. Exceptions help programmers develop more robust, <br>
  735.  
  736. </page>
  737. <page>
  738. fault-tolerant, business-critical and mission-critical 
  739. systems.<br>
  740. <spacer width=16 height=1>The sixth part, Chapter 15, presents a thorough 
  741. treatment of dynamic data structures such as linked 
  742. lists, queues, stacks, and trees. This chapter, when 
  743. supplemented with the treatment of the Standard 
  744. Template Library in Chapter 20, creates a rich treatment 
  745. of data structures that makes a nice C++ supplement to 
  746. traditional computer science data structures and 
  747. algorithms courses.<br>
  748. <spacer width=16 height=1>The seventh part, Chapters 16 through 18 discuss a 
  749. variety of topics including bit, character and string <br>
  750.  
  751. </page>
  752. <page>
  753. manipulation; the preprocessor, and miscellaneous 
  754. "Other Topics."<br>
  755. <spacer width=16 height=1>The last part of the main text, Chapters 19 through 21, 
  756. is devoted to the latest enhancements to C++ and to the 
  757. C++ Standard Library which have been included in the 
  758. ANSI/ISO C++ Draft Standard. These include 
  759. discussions of class <tt><b>string</b></tt>, string stream processing, 
  760. the Standard Template Library (STL), and a potpourri 
  761. of other recent additions to C++.<br>
  762. <spacer width=16 height=1>The end matter of the book consists of reference 
  763. materials that support the main text including 
  764. Appendices on operator precedence, the ASCII 
  765. character set, number systems (binary, decimal, octal <br>
  766.  
  767. </page>
  768. <page>
  769. and hexadecimal) and C++ Internet/World Wide Web 
  770. resources. An extensive bibliography is included to 
  771. encourage further reading. The text concludes with a 
  772. detailed index that helps the reader locate any terms in 
  773. the text by keyword. Now let us look at each of the 
  774. chapters in detail.<br>
  775. <font size=18><b>Chapter 1--Introduction to Computers and C++ 
  776. Programming--
  777. </b></font><br>
  778. discusses what computers are, how they work, and how 
  779. they are programmed. It introduces the notion of 
  780. structured programming and explains why this set of 
  781. techniques has fostered a revolution in the way 
  782. programs are written. The chapter gives a brief history <br>
  783.  
  784. </page>
  785. <page>
  786. of the development of programming languages from 
  787. machine languages, to assembly languages, to high-
  788. level languages. The origin of the C++ programming 
  789. language is discussed. The chapter includes an 
  790. introduction to a typical C++ programming 
  791. environment and gives a concise introduction to writing 
  792. C++ programs. A detailed treatment of decision making 
  793. and arithmetic operations in C++ is presented. After 
  794. studying this chapter, the student will understand how 
  795. to write simple, but complete, C++ programs. We 
  796. discuss the explosion in interest in the Internet that has 
  797. occurred with the advent of the World Wide Web and 
  798. the Java programming language. We discuss <br>
  799.  
  800. </page>
  801. <page>
  802. <b>namespaces</b> and the <b>using</b> statement for the benefit of 
  803. readers with access to draft-standard-compliant 
  804. compilers. We continue to use the "old-style" header 
  805. files in the early chapters of this edition; we use the new 
  806. style headers later in the book where the bulk of the 
  807. new C++ material appears. It will take a few years to 
  808. "clear out" the older compilers that are still widely 
  809. used. Readers wishing to plunge right in with object-
  810. orientation, should read the "Thinking About Objects" 
  811. section which introduces the basic terminology of 
  812. object technology.<br>
  813.  
  814. </page>
  815. <page>
  816. <font size=18><b>Chapter 2--Control Structures--
  817. </b></font><br>
  818. introduces the notion of algorithms (procedures) for 
  819. solving problems. It explains the importance of using 
  820. control structures effectively in producing programs 
  821. that are understandable, debuggable, maintainable and 
  822. more likely to work properly on the first try. It 
  823. introduces the sequence structure, selection structures 
  824. (<b>if</b>, <b>if/else</b> and <b>switch</b>) and repetition structures (<b>while</b>, 
  825. <b>do/while</b> and <b>for</b>). It examines repetition in detail, and 
  826. compares the alternatives of counter-controlled loops 
  827. and sentinel-controlled loops. It explains the technique 
  828. of top-down, stepwise refinement that is critical to the 
  829. production of properly structured programs, and <br>
  830.  
  831. </page>
  832. <page>
  833. presents the popular program design aid, pseudocode. 
  834. The methods and approaches used in Chapter 2 are 
  835. applicable to effective use of control structures in any 
  836. programming language, not just C++. This chapter 
  837. helps the student develop good programming habits in 
  838. preparation for dealing with the more substantial 
  839. programming tasks in the remainder of the text. The 
  840. chapter concludes with a discussion of logical 
  841. operators--<b>&&</b> (and), <b>||</b> (or) and <b>!</b> (not). The keyword 
  842. chart has been enhanced with the new keywords. We 
  843. introduce the new-style <b>static_cast</b> operator. This is 
  844. safer than using the old-style casting C++ inherited 
  845. from C. We added the "Peter Minuit" exercise so <br>
  846.  
  847. </page>
  848. <page>
  849. students can see the wonders of compound interest--
  850. with the computer doing most of the work! We have 
  851. introduced a new, more open, easier to read "look and 
  852. feel" for our C++ source programs. We have tuned the 
  853. elevator case study. Our readers who attempt this 
  854. detailed case study tell us that it ties the concepts 
  855. together nicely. We discuss the new scoping rules for 
  856. loop counters in <b>for</b>-loops.<br>
  857. <font size=18><b>Chapter 3--Functions--
  858. </b></font><br>
  859. discusses the design and construction of program 
  860. modules. C++'s function-related capabilities include 
  861. standard library functions, programmer-defined 
  862. functions, recursion, call-by-value and call-by-<br>
  863.  
  864. </page>
  865. <page>
  866. reference capabilities. The techniques presented in 
  867. Chapter 3 are essential to the production of properly 
  868. structured programs, especially the kinds of larger 
  869. programs and software that system programmers and 
  870. application programmers are likely to develop in real-
  871. world applications. The "divide and conquer" strategy 
  872. is presented as an effective means for solving complex 
  873. problems by dividing them into simpler interacting 
  874. components. Students enjoy the treatment of random 
  875. numbers and simulation, and they appreciate the 
  876. discussion of the dice game craps which makes elegant 
  877. use of control structures. The chapter offers a solid 
  878. introduction to recursion and includes a table <br>
  879.  
  880. </page>
  881. <page>
  882. summarizing the dozens of recursion examples and 
  883. exercises distributed throughout the remainder of the 
  884. book. Some texts leave recursion for a chapter late in 
  885. the book; we feel this topic is best covered gradually 
  886. throughout the text. The extensive collection of 60 
  887. exercises at the end of the chapter includes several 
  888. classical recursion problems such as the Towers of 
  889. Hanoi. The chapter discusses the so-called "C++ 
  890. enhancements to C," including <b>inline</b> functions, 
  891. reference parameters, default arguments, the unary 
  892. scope resolution operator, function overloading, and 
  893. function templates. The header files chart has been 
  894. modified to include many of the new header files that <br>
  895.  
  896. </page>
  897. <page>
  898. the reader will use throughout the book. Please do 
  899. exercise 3.54 on adding a wagering capability to the 
  900. craps program. And be sure to do the "Thinking About 
  901. Objects" section which guides you through determining 
  902. the attributes (i.e., data) that the classes in your elevator 
  903. simulator will need.<br>
  904. <font size=18><b>Chapter 4--Arrays--
  905. </b></font><br>
  906. discusses the structuring of data into arrays, or groups, 
  907. of related data items of the same type. The chapter 
  908. presents numerous examples of both single-subscripted 
  909. arrays and double-subscripted arrays. It is widely 
  910. recognized that structuring data properly is just as 
  911. important as using control structures effectively in the <br>
  912.  
  913. </page>
  914. <page>
  915. development of properly structured programs. 
  916. Examples in the chapter investigate various common 
  917. array manipulations, printing histograms, sorting data, 
  918. passing arrays to functions, and an introduction to the 
  919. field of survey data analysis (with simple statistics). A 
  920. feature of this chapter is the discussion of elementary 
  921. sorting and searching techniques and the presentation of 
  922. binary searching as a dramatic improvement over linear 
  923. searching. The 38 end-of-chapter exercises include a 
  924. variety of interesting and challenging problems such as 
  925. improved sorting techniques, the design of an airline 
  926. reservations system, an introduction to the concept of 
  927. turtle graphics (made famous in the LOGO language), <br>
  928.  
  929. </page>
  930. <page>
  931. and the Knight's Tour and Eight Queens problems that 
  932. introduce the notion of heuristic programming so 
  933. widely employed in the field of artificial intelligence. 
  934. The exercises conclude with 8 recursion problems 
  935. including the selection sort, palindromes, linear search, 
  936. binary search, the eight queens, printing an array, 
  937. printing a string backwards, and finding the minimum 
  938. value in an array. This chapter still uses C-style arrays 
  939. which, as you will see in Chapter 5, are really pointers 
  940. to the array contents in memory. We are certainly 
  941. committed to arrays as full-fledged objects. In Chapter 
  942. 8, we use the techniques of operator overloading to 
  943. craft a valuable <b>Array</b> class out of which we create <br>
  944.  
  945. </page>
  946. <page>
  947. <b>Array</b> objects that are much more robust and pleasant 
  948. to program with than the arrays of Chapter 4. In 
  949. Chapter 20, "Standard Template Library (STL)," we 
  950. introduce STL's class <b>vector</b> which, when used with the 
  951. iterators and algorithms discussed in Chapter 20, 
  952. creates a solid treatment of arrays as full-fledged 
  953. objects. The "Thinking About Objects" section guides 
  954. you through determining the behaviors (i.e., functions) 
  955. of the classes in your elevator simulator.<br>
  956. <font size=18><b>Chapter 5--Pointers and Strings--
  957. </b></font><br>
  958. presents one of the most powerful and difficult-to-
  959. master features of the C++ language, namely pointers. 
  960. The chapter provides detailed explanations of pointer <br>
  961.  
  962. </page>
  963. <page>
  964. operators, call by reference, pointer expressions, 
  965. pointer arithmetic, the relationship between pointers 
  966. and arrays, arrays of pointers, and pointers to functions. 
  967. There is an intimate relationship between pointers, 
  968. arrays, and strings in C++, so we introduce basic string-
  969. manipulation concepts and include a discussion of some 
  970. of the most popular string-handling functions, namely 
  971. <b>getline</b> (input a line of text), <b>strcpy</b> and <b>strncpy</b> (copy 
  972. a string), <b>strcat</b> and <b>strncat</b>, (concatenate two strings) 
  973. <b>strcmp</b> and <b>strncmp</b> (compare two strings), <b>strtok</b> 
  974. ("tokenize" a string into its pieces), and <b>strlen</b> 
  975. (compute the length of a string). The 49 chapter 
  976. exercises include a simulation of the classic race <br>
  977.  
  978. </page>
  979. <page>
  980. between the tortoise and the hare, card shuffling and 
  981. dealing algorithms, recursive quicksort, and recursive 
  982. maze traversals. A special section entitled "Building 
  983. Your Own Computer" is also included. This section 
  984. explains machine-language programming and proceeds 
  985. with a project involving the design and implementation 
  986. of a computer simulator that allows the reader to write 
  987. and run machine language programs. This unique 
  988. feature of the text will be especially useful to the reader 
  989. who wants to understand how computers really work. 
  990. Our students enjoy this project and often implement 
  991. substantial enhancements; many enhancements are 
  992. suggested in the exercises. In Chapter 15, another <br>
  993.  
  994. </page>
  995. <page>
  996. special section guides the reader through building a 
  997. compiler; the machine language produced by the 
  998. compiler is then executed on the machine language 
  999. simulator produced in Chapter 7. Information is 
  1000. communicated from the compiler to the simulator in 
  1001. sequential files which we discuss in Chapter 14. A 
  1002. second special section includes challenging string-
  1003. manipulation exercises related to text analysis, word 
  1004. processing, printing dates in various formats, check 
  1005. protection, writing the word equivalent of a check 
  1006. amount, Morse Code, and metric-to-English 
  1007. conversions. The reader will want to revisit these 
  1008. string-manipulation exercises after studying class <br>
  1009.  
  1010. </page>
  1011. <page>
  1012. <b>string</b> in Chapter 19. Many people find that the topic of 
  1013. pointers is, by far, the most difficult part of an 
  1014. introductory programming course. In C and "raw C++" 
  1015. arrays and strings are really pointers to array and string 
  1016. contents in memory. Even function names are pointers. 
  1017. Studying this chapter carefully should reward you with 
  1018. a deep understanding of the complex topic of pointers. 
  1019. Again, we cover arrays and strings as full-fledged 
  1020. objects later in the book. In Chapter 8, we use operator 
  1021. overloading to craft customized <b>Array</b> and <b>String</b> 
  1022. classes. In Chapter 19, we discuss Standard Library 
  1023. class <b>string</b> and show how to manipulate <b>string</b> 
  1024. objects. In Chapter 20 we discuss class <b>vector</b>. Chapter <br>
  1025.  
  1026. </page>
  1027. <page>
  1028. 5 is loaded with challenging exercises. Please be sure to 
  1029. try the <i>Special Section: Building Your Own Computer</i>. 
  1030. The "Thinking About Objects" section guides you 
  1031. through determining the collaborations among the 
  1032. classes in your elevator simulator.<br>
  1033. <font size=18><b>Chapter 6--Classes and Data Abstraction--
  1034. </b></font><br>
  1035. begins our discussion of object-based programming. 
  1036. The chapter represents a wonderful opportunity for 
  1037. teaching data abstraction the "right way"--through a 
  1038. language (C++) expressly devoted to implementing 
  1039. abstract data types (ADTs). In recent years, data 
  1040. abstraction has become a major topic in introductory 
  1041. computing courses. Chapters 6, 7, and 8 include a solid <br>
  1042.  
  1043. </page>
  1044. <page>
  1045. treatment of data abstraction. Chapter 6 discusses 
  1046. implementing ADTs as <b>struct</b>s, implementing ADTs as 
  1047. C++-style <b>classes</b> and why this approach is superior to 
  1048. using<b> struct</b>s, accessing <b>class</b> members, separating 
  1049. interface from implementation, using access functions 
  1050. and utility functions, initializing objects with 
  1051. constructors, destroying objects with destructors, 
  1052. assignment by default memberwise copy, and software 
  1053. reusability. The chapter exercises challenge the student 
  1054. to develop classes for complex numbers, rational 
  1055. numbers, times, dates, rectangles, huge integers, and for 
  1056. playing tic-tac-toe. Students generally enjoy game-
  1057. playing programs. The "Thinking About Objects" <br>
  1058.  
  1059. </page>
  1060. <page>
  1061. section now asks you to write a class header file and 
  1062. member function definition source files for each of the 
  1063. classes in your elevator simulator. It outlines the 
  1064. operation of a driver program to run your simulator, and 
  1065. suggests some useful outputs. The more mathematically 
  1066. inclined reader will enjoy the exercises on creating 
  1067. class <b>Complex</b> (for complex numbers), class <b>Rational</b> 
  1068. (for rational numbers) and class <b>HugeInteger</b> (for 
  1069. arbitrarily large integers).<br>
  1070. newtitle
  1071. <b>Chapter 7--Classes Part II--
  1072. </b>
  1073. <b><b>Chapter 7--Classes Part II--
  1074. </b></b><br>
  1075. continues the study of classes and data abstraction. The 
  1076. chapter discusses declaring and using constant objects, 
  1077. constant member functions, composition--the process <br>
  1078.  
  1079. </page>
  1080. <page>
  1081. of building classes that have objects of other classes as 
  1082. members, <b>friend</b> functions and <b>friend</b> classes that have 
  1083. special access rights to the <b>private</b> and <b>protected</b> 
  1084. members of classes, the <b>this</b> pointer that enables an 
  1085. object to know its own address, dynamic memory 
  1086. allocation, <b>static</b> class members for containing and 
  1087. manipulating class-wide data, examples of popular 
  1088. abstract data types (arrays, strings, and queues), 
  1089. container classes, and iterators. The chapter exercises 
  1090. ask the student to develop a savings account class and a 
  1091. class for holding sets of integers. In our discussion of 
  1092. <b>const</b> objects, we briefly mention the new keyword 
  1093. <b>mutable</b> which, as we will see in Chapter 21, is used in <br>
  1094.  
  1095. </page>
  1096. <page>
  1097. a subtle manner to enable modification of non-visible" 
  1098. implementation in <b>const</b> objects. We discuss dynamic 
  1099. memory allocation with <b>new</b> and <b>delete</b>. When <b>new</b> 
  1100. fails, it returns a 0 pointer in old-style C++. We use this 
  1101. old style in Chapters 7-12. We defer to Chapter 13 the 
  1102. discussion of the new style of <b>new</b> failure in which <b>new</b> 
  1103. now "throws an exception." We have added to the 
  1104. discussion of <b>static</b> class members a video-game-based 
  1105. motivating example. We emphasize throughout the 
  1106. book and in our professional seminars how important it 
  1107. is to hide implementation details from clients of a class. 
  1108. Then, we show <b>private</b> data on our class headers, 
  1109. which certainly reveals implementation. We have <br>
  1110.  
  1111. </page>
  1112. <page>
  1113. introduced a new section on proxy classes, a nice means 
  1114. of hiding even <b>private</b> data from clients of a class. The 
  1115. "Thinking About Objects" section asks you to 
  1116. incorporate dynamic memory management and 
  1117. composition into your elevator simulator. Students will 
  1118. enjoy the exercise creating class <b>Integerset</b>. This serves 
  1119. as excellent motivation for the treatment of operator 
  1120. overloading in Chapter 8.<br>
  1121. <font size=18><b>Chapter 8--Operator Overloading--
  1122. </b></font><br>
  1123. is one of the most popular topics in our C++ courses. 
  1124. Students really enjoy this material. They find it a 
  1125. perfect match with the discussion of abstract data types 
  1126. in Chapters 6 and 7. Operator overloading enables the <br>
  1127.  
  1128. </page>
  1129. <page>
  1130. programmer to tell the compiler how to use existing 
  1131. operators with objects of new types. C++ already 
  1132. knows how to use these operators with objects of built-
  1133. in types such as integers, floats, and characters. But 
  1134. suppose we create a new string class. What does the 
  1135. plus sign mean? Many programmers use plus with 
  1136. strings to mean concatenation. In Chapter 8, the 
  1137. programmer will learn how to "overload" the plus sign 
  1138. so that when it is written between two string objects in 
  1139. an expression, the compiler will generate a function call 
  1140. to an "operator function" that will concatenate the two 
  1141. strings. The chapter discusses the fundamentals of 
  1142. operator overloading, restrictions in operator <br>
  1143.  
  1144. </page>
  1145. <page>
  1146. overloading, overloading with class member functions 
  1147. vs. with nonmember functions, overloading unary and 
  1148. binary operators, and converting between types. A 
  1149. feature of the chapter is the collection of substantial 
  1150. case studies including an array class, a string class, a 
  1151. date class, a huge integers class, and a complex 
  1152. numbers class (the last two appear with full source code 
  1153. in the exercises). The more mathematically inclined 
  1154. student will enjoy creating the polynomial class in the 
  1155. exercises. We find the students really enjoy this 
  1156. material. It is different from what you do in most 
  1157. programming languages and courses. Operator 
  1158. overloading is a complex topic, but an enriching one. <br>
  1159.  
  1160. </page>
  1161. <page>
  1162. Using operator overloading wisely helps you add that 
  1163. extra "polish" to your classes. The discussions of class 
  1164. <b>Array</b> and class <b>String</b> are particularly valuable to 
  1165. students who will go on to use the Standard Library 
  1166. classes <b>string</b> and <b>vector</b>. With the techniques of 
  1167. Chapters 6, 7 and 8, it is possible to craft a <b>Date</b> class 
  1168. that, if we had been using it for the last two decades, 
  1169. could easily have eliminated a major portion of the so-
  1170. called "Year 2000 Problem." The exercises encourage 
  1171. the student to add operator overloading to classes 
  1172. <b>Complex</b>, <b>Rational</b>, and <b>HugeInteger</b> to enable 
  1173. convenient manipulation of objects of these classes 
  1174. with operator symbols--as in mathematics--rather than <br>
  1175.  
  1176. </page>
  1177. <page>
  1178. with function calls as the student did in the Chapter 7 
  1179. exercises.<br>
  1180. <font size=18><b>Chapter 9--Inheritance--
  1181. </b></font><br>
  1182. deals with one of the most fundamental capabilities of 
  1183. object-oriented programming languages. Inheritance is 
  1184. a form of software reusability in which new classes are 
  1185. developed quickly and easily by absorbing the 
  1186. capabilities of existing classes and adding appropriate 
  1187. new capabilities. The chapter discusses the notions of 
  1188. base classes and derived classes, <b>protected</b> members, 
  1189. <b>public</b> inheritance, <b>protected</b> inheritance, <b>private</b> 
  1190. inheritance, direct base classes, indirect base classes, 
  1191. constructors and destructors in base classes and derived <br>
  1192.  
  1193. </page>
  1194. <page>
  1195. classes, and software engineering with inheritance. The 
  1196. chapter compares inheritance ("is a" relationships) with 
  1197. composition ("has a" relationships) and introduces 
  1198. "uses a" and "knows a" relationships. A feature of the 
  1199. chapter is its several substantial case studies. In 
  1200. particular, a lengthy case study implements a point, 
  1201. circle, cylinder class hierarchy. The chapter concludes 
  1202. with a case study on multiple inheritance--an advanced 
  1203. feature of C++ that enables a derived class to be formed 
  1204. by inheriting attributes and behaviors from several base 
  1205. classes. The exercises ask the student to compare the 
  1206. creation of new classes by inheritance vs. composition; 
  1207. to extend the various inheritance hierarchies discussed <br>
  1208.  
  1209. </page>
  1210. <page>
  1211. in the chapter; to write an inheritance hierarchy for 
  1212. quadrilaterals, trapezoids, parallelograms, rectangles, 
  1213. and squares; and to create a more general shape 
  1214. hierarchy with two-dimensional shapes and three-
  1215. dimensional shapes. We modified our inheritance 
  1216. hierarchy for the university community members to 
  1217. show a nice example of multiple inheritance. In Chapter 
  1218. 21 we continue our discussion of multiple inheritance 
  1219. by exposing the problems caused by so-called 
  1220. "diamond inheritance" and showing how to solve these 
  1221. problems with <b>virtual</b> base classes.<br>
  1222.  
  1223. </page>
  1224. <page>
  1225. <font size=18><b>Chapter 10--Virtual Functions and Polymorphism--
  1226. </b></font><br>
  1227. deals with another of the fundamental capabilities of 
  1228. object-oriented programming, namely polymorphic 
  1229. behavior. When many classes are related through 
  1230. inheritance to a common base class, each derived-class 
  1231. object may be treated as a base-class object. This 
  1232. enables programs to be written in a general manner 
  1233. independent of the specific types of the derived-class 
  1234. objects. New kinds of objects can be handled by the 
  1235. same program, thus making systems more extensible. 
  1236. Polymorphism enables programs to eliminate complex 
  1237. <b>switch</b> logic in favor of simpler "straight-line" logic. A <br>
  1238.  
  1239. </page>
  1240. <page>
  1241. screen manager of a video game, for example, can 
  1242. simply send a draw message to every object in a linked 
  1243. list of objects to be drawn. Each object knows how to 
  1244. draw itself. A new object can be added to the program 
  1245. without modifying that program as long as that new 
  1246. object also knows how to draw itself. This style of 
  1247. programming is typically used to implement today's 
  1248. popular graphical user interfaces (GUIs). The chapter 
  1249. discusses the mechanics of achieving polymorphic 
  1250. behavior through the use of <b>virtual</b> functions. It 
  1251. distinguishes between abstract classes (from which 
  1252. objects cannot be instantiated) and concrete classes 
  1253. (from which objects can be instantiated). Abstract <br>
  1254.  
  1255. </page>
  1256. <page>
  1257. classes are useful for providing an inheritable interface 
  1258. to classes throughout the hierarchy. A feature of the 
  1259. chapter is its two major polymorphism case studies--a 
  1260. payroll system and another version of the point, circle, 
  1261. cylinder shape hierarchy discussed in Chapter 9. The 
  1262. chapter exercises ask the student to discuss a number of 
  1263. conceptual issues and approaches, add abstract classes 
  1264. to the shape hierarchy, develop a basic graphics 
  1265. package, modify the chapter's employee class--and 
  1266. pursue all these projects with <b>virtual</b> functions and 
  1267. polymorphic programming. The chapter's two 
  1268. polymorphism case studies show a contrast in 
  1269. inheritance styles. The first example (of a payroll <br>
  1270.  
  1271. </page>
  1272. <page>
  1273. system) is a clear, "sensible" use of inheritance. The 
  1274. second, which builds on the point, circle, cylinder 
  1275. hierarchy developed in Chapter 9, is an example of 
  1276. what some professionals call "structural inheritance"--
  1277. not as natural and sensible as the first, but 
  1278. "mechanically correct" nevertheless. We decided to 
  1279. keep this second example because of the new section 
  1280. we added in this edition, entitled "Polymorphism, 
  1281. <b>virtual</b> Functions and Dynamic Binding "Under the 
  1282. Hood." We deliver our C++ professional seminars to 
  1283. senior software engineers. These people appreciated the 
  1284. two polymorphism examples in the first edition, but 
  1285. they felt something was missing from our presentations. <br>
  1286.  
  1287. </page>
  1288. <page>
  1289. Yes, they said, we showed them how to program with 
  1290. polymorphism in C++. But they wanted more. They 
  1291. told us they were concerned about the operating 
  1292. overhead of programming polymorphically. It's a nice 
  1293. feature, they said, but it clearly has costs. So our 
  1294. professional audiences insisted that we provide a deeper 
  1295. explanation that showed precisely how polymorphism 
  1296. is implemented in C++, and hence, precisely what 
  1297. execution time and memory "costs" one must pay when 
  1298. programming with this powerful capability. We 
  1299. responded by developing an illustration that shows the 
  1300. <i>vtables</i> (<b>virtual</b> function tables) the C++ compiler 
  1301. automatically builds to support the polymorphic <br>
  1302.  
  1303. </page>
  1304. <page>
  1305. programming style. We drew these tables in our classes 
  1306. in which we discussed the point, circle, cylinder shape 
  1307. hierarchy. Our audiences indicated that this indeed gave 
  1308. them the information to decide whether polymorphism 
  1309. was an appropriate programming style for each new 
  1310. project they would tackle. We have included this 
  1311. presentation in Section 10.10 and the <i>vtable</i> illustration 
  1312. in Fig. 10.2. Please study this presentation carefully. It 
  1313. will give you a much deeper understanding of what's 
  1314. really occurring in the computer when you program 
  1315. with inheritance and polymorphism.<br>
  1316.  
  1317. </page>
  1318. <page>
  1319. <font size=18><b>Chapter 11--C++ Stream Input/Output--
  1320. </b></font><br>
  1321. contains a comprehensive treatment of the new object-
  1322. oriented style of input/output introduced in C++. The 
  1323. chapter discusses the various I/O capabilities of C++ 
  1324. including output with the stream insertion operator, 
  1325. input with the stream extraction operator, type-safe I/O 
  1326. (a nice improvement over C), formatted I/O, 
  1327. unformatted I/O (for performance), stream 
  1328. manipulators for controlling the stream base (decimal, 
  1329. octal, or hexadecimal), floating-point numbers, 
  1330. controlling field widths, user-defined manipulators, 
  1331. stream format states, stream error states, I/O of objects 
  1332. of user-defined types, and tying output streams to input <br>
  1333.  
  1334. </page>
  1335. <page>
  1336. streams (to ensure that prompts actually appear before 
  1337. the user is expected to enter responses). The extensive 
  1338. exercise set asks the student to write various programs 
  1339. that test most of the I/O capabilities discussed in the 
  1340. text.<br>
  1341. <font size=18><b>Chapter 12--Templates--
  1342. </b></font><br>
  1343. discusses one of the more recent additions to the 
  1344. evolving C++ language. Function templates were 
  1345. introduced in Chapter 3. Chapter 12 presents an 
  1346. additional function template example. Class templates 
  1347. enable the programmer to capture the essence of an 
  1348. abstract data type (such as a stack, an array, or a queue) 
  1349. and then create--with minimal additional code--<br>
  1350.  
  1351. </page>
  1352. <page>
  1353. versions of that ADT for particular types (such as a 
  1354. queue of <b>int</b>, a queue of <b>float</b>, a queue of strings, etc.). 
  1355. For this reason, template classes are often called 
  1356. parameterized types. The chapter discusses using type 
  1357. parameters and nontype parameters and considers the 
  1358. interaction among templates and other C++ concepts, 
  1359. such as inheritance, <b>friends</b>, and <b>static</b> members. The 
  1360. exercises challenge the student to write a variety of 
  1361. function templates and class templates, and to employ 
  1362. these in complete programs. We did not add anything to 
  1363. Chapter 12 in this edition, but we have greatly 
  1364. enhanced the treatment of templates with the discussion <br>
  1365.  
  1366. </page>
  1367. <page>
  1368. of the Standard Template Library (STL) containers, 
  1369. iterators and algorithms in (102-page) Chapter 20.<br>
  1370. <font size=18><b>Chapter 13--Exception Handling--
  1371. </b></font><br>
  1372. discusses one of the more recent enhancements to the 
  1373. C++ language. Exception handling enables the 
  1374. programmer to write programs that are more robust, 
  1375. more fault tolerant, and more appropriate for business-
  1376. critical and mission-critical environments. The chapter 
  1377. discusses when exception handling is appropriate; 
  1378. introduces the basics of exception handling with <b>try</b> 
  1379. blocks, <b>throw</b> statements, and <b>catch</b> blocks; indicates 
  1380. how and when to rethrow an exception; explains how to 
  1381. write an exception specification and process <br>
  1382.  
  1383. </page>
  1384. <page>
  1385. unexpected exceptions; and discusses the important ties 
  1386. between exceptions and constructors, destructors, and 
  1387. inheritance. A feature of the chapter is its 43 exercises 
  1388. that walk the student through implementing programs 
  1389. that illustrate the diversity and power of C++'s 
  1390. exception handling capabilities. We added the "live-
  1391. code" example of Fig. 13.2 on rethrowing an exception 
  1392. and another "live-code" example in Fig. 13.3 on stack 
  1393. unwinding. We added a pair of examples in Fig. 13.4 
  1394. and Fig. 13.5 illustrating both ways <b>new</b> can fail when 
  1395. memory is exhausted. Prior to the C++ draft standard 
  1396. <b>new</b> fails by returning 0, much as <b>malloc</b> fails in C by 
  1397. returning a <b>NULL</b> pointer value--this is shown in Fig. <br>
  1398.  
  1399. </page>
  1400. <page>
  1401. 13.4. Figure 13.5 shows the new style of <b>new</b> failing by 
  1402. throwing a <b>bad_alloc</b> (bad allocation) exception. We 
  1403. added the example of Fig. 13.6 illustrating how to use 
  1404. <b>set_new_handler</b> to specify a custom function to be 
  1405. called to deal with memory exhaustion situations. We 
  1406. added section 13.15 which discusses the new <b>auto_ptr</b> 
  1407. class template to guarantee that dynamically allocated 
  1408. memory will be properly<b> delete</b>d to avoid memory 
  1409. leaks. We added a discussion of the new Standard 
  1410. Library Exception Hierarchy in section 13.16<br>
  1411. <font size=18><b>Chapter 14--File Processing--
  1412. </b></font><br>
  1413. discusses the techniques used to process text files with 
  1414. sequential access and random access. The chapter <br>
  1415.  
  1416. </page>
  1417. <page>
  1418. begins with an introduction to the data hierarchy from 
  1419. bits, to bytes, to fields, to records, to files. Next, C++'s 
  1420. simple view of files and streams is presented. 
  1421. Sequential-access files are discussed using a series of 
  1422. three programs that show how to open and close files, 
  1423. how to store data sequentially in a file, and how to read 
  1424. data sequentially from a file. Random-access files are 
  1425. discussed using a series of four programs that show 
  1426. how to sequentially create a file for random access, how 
  1427. to read and write data to a file with random access, and 
  1428. how to read data sequentially from a randomly accessed 
  1429. file. The fourth random-access program combines 
  1430. many of the techniques of accessing files both <br>
  1431.  
  1432. </page>
  1433. <page>
  1434. sequentially and randomly into a complete transaction-
  1435. processing program. Students in our industry seminars 
  1436. have told us that after studying the material on file 
  1437. processing, they were able to produce substantial file-
  1438. processing programs that were immediately useful in 
  1439. their organizations. The exercises ask the student to 
  1440. implement a variety of programs that build and process 
  1441. both sequential-access files and random-access files. 
  1442. We thinned out Chapter 14 a bit by removing the 
  1443. material on String Stream Processing. That material has 
  1444. been rewritten and more appropriately positioned at the 
  1445. end of Chapter 19.<br>
  1446.  
  1447. </page>
  1448. <page>
  1449. <font size=18><b>Chapter 15--Data Structures--
  1450. </b></font><br>
  1451. discusses the techniques used to create and manipulate 
  1452. dynamic data structures. The chapter begins with 
  1453. discussions of self-referential classes and dynamic 
  1454. memory allocation. The chapter proceeds with a 
  1455. discussion of how to create and maintain various 
  1456. dynamic data structures including linked lists, queues 
  1457. (or waiting lines), stacks, and trees. For each type of 
  1458. data structure, we present complete, working programs 
  1459. and show sample outputs. The chapter really helps the 
  1460. student master pointers. The chapter includes abundant 
  1461. examples using indirection and double indirection--a 
  1462. particularly difficult concept. One problem when <br>
  1463.  
  1464. </page>
  1465. <page>
  1466. working with pointers is that students have trouble 
  1467. visualizing the data structures and how their nodes are 
  1468. linked together. So we have included illustrations that 
  1469. show the links and the sequence in which they are 
  1470. created. The binary tree example is a superb capstone 
  1471. for the study of pointers and dynamic data structures. 
  1472. This example creates a binary tree; enforces duplicate 
  1473. elimination; and introduces recursive preorder, inorder, 
  1474. and postorder tree traversals. Students have a genuine 
  1475. sense of accomplishment when they study and 
  1476. implement this example. They particularly appreciate 
  1477. seeing that the inorder traversal prints the node values 
  1478. in sorted order. The chapter includes a substantial <br>
  1479.  
  1480. </page>
  1481. <page>
  1482. collection of exercises. A highlight of the exercises is 
  1483. the special section "Building Your Own Compiler." The 
  1484. exercises walk the student through the development of 
  1485. an infix-to-postfix-conversion program and a postfix-
  1486. expression-evaluation program. We then modify the 
  1487. postfix evaluation algorithm to generate machine-
  1488. language code. The compiler places this code in a file 
  1489. (using the techniques of Chapter 1). Students then run 
  1490. the machine language produced by their compilers on 
  1491. the software simulators they built in the exercises of 
  1492. Chapter 5! The 35 exercises include a supermarket 
  1493. simulation using queueing, recursively searching a list, 
  1494. recursively printing a list backwards, binary-tree node <br>
  1495.  
  1496. </page>
  1497. <page>
  1498. deletion, level-order traversal of a binary tree, printing 
  1499. trees, writing a portion of an optimizing compiler, 
  1500. writing an interpreter, inserting/deleting anywhere in a 
  1501. linked list, implementing lists and queues without tail 
  1502. pointers, analyzing the performance of binary tree 
  1503. searching and sorting, and implementing an indexed list 
  1504. class. Chapter 15 has been tuned up but not enhanced. It 
  1505. is already a substantial, "down-deep" treatment of 
  1506. building important data structures. After studying 
  1507. Chapter 15, the reader is prepared for the treatment of 
  1508. STL containers, iterators and algorithms in Chapter 20. 
  1509. The STL containers are pre-packaged, templatized data 
  1510. structures that most programs will find sufficient for the <br>
  1511.  
  1512. </page>
  1513. <page>
  1514. vast majority of applications they will need to 
  1515. implement. STL is a giant leap forward in achieving the 
  1516. vision of reuse, reuse, reuse.<br>
  1517. <font size=18><b>Chapter 16--Bits, Characters, Strings, and Structures-- 
  1518. </b></font><br>
  1519. presents a variety of important features. C++'s powerful 
  1520. bit-manipulation capabilities enable programmers to 
  1521. write programs that exercise lower-level hardware 
  1522. capabilities. This helps programs process bit strings, set 
  1523. individual bits on or off, and store information more 
  1524. compactly. Such capabilities, often found only in low-
  1525. level assembly languages, are valued by programmers 
  1526. writing system software such as operating systems and <br>
  1527.  
  1528. </page>
  1529. <page>
  1530. networking software. As you recall, we introduced C-
  1531. style <b>char *</b> string manipulation in Chapter 5 and 
  1532. presented the most popular string-manipulation 
  1533. functions. In Chapter 16, we continue our presentation 
  1534. of characters and C-style <b>char *</b> strings. We present the 
  1535. various character-manipulation capabilities of the <b>ctype</b> 
  1536. library--these include the ability to test a character to 
  1537. see if it is a digit, an alphabetic character, an 
  1538. alphanumeric character, a hexadecimal digit, a 
  1539. lowercase letter, an uppercase letter, etc. We present 
  1540. the remaining string-manipulation functions of the 
  1541. various string-related libraries; as always, every 
  1542. function is presented in the context of a complete, <br>
  1543.  
  1544. </page>
  1545. <page>
  1546. working C++ program. Structures are like records in 
  1547. Pascal and other languages--they aggregate data items 
  1548. of various types. Structures are used in Chapter 14 to 
  1549. form files consisting of records of information. 
  1550. Structures are used in conjunction with pointers and 
  1551. dynamic memory allocation in Chapter 15 to form 
  1552. dynamic data structures such as linked lists, queues, 
  1553. stacks, and trees. A feature of the chapter is its revised, 
  1554. high-performance card shuffling and dealing 
  1555. simulation. This is an excellent opportunity for the 
  1556. instructor to emphasize the quality of algorithms. The 
  1557. 36 exercises encourage the student to try out most of 
  1558. the capabilities discussed in the chapter. The feature <br>
  1559.  
  1560. </page>
  1561. <page>
  1562. exercise leads the student through the development of a 
  1563. spell checker program. Chapters 15 and 1618 are 
  1564. mostly the "C legacy" portion of C++. In particular, this 
  1565. chapter presents a deeper treatment of C-like, <b>char *</b> 
  1566. strings for the benefit of C++ programmers who are 
  1567. likely to work with C legacy code. Again, Chapter 19 
  1568. discusses class <b>string</b> and discusses manipulating 
  1569. strings as full-fledged objects.<br>
  1570. <font size=18><b>Chapter 17--The Preprocessor--
  1571. </b></font><br>
  1572. provides detailed discussions of the preprocessor 
  1573. directives. The chapter includes more complete 
  1574. information on the <b>#include</b> directive that causes a 
  1575. copy of a specified file to be included in place of the <br>
  1576.  
  1577. </page>
  1578. <page>
  1579. directive before the file is compiled, and the <b>#define</b> 
  1580. directive that creates symbolic constants and macros. 
  1581. The chapter explains conditional compilation for 
  1582. enabling the programmer to control the execution of 
  1583. preprocessor directives and the compilation of program 
  1584. code. The <b>#</b> operator that converts its operand to a 
  1585. string and the<b> ##</b> operator that concatenates two tokens 
  1586. are discussed. The various predefined preprocessor 
  1587. symbolic constants (<b>__LINE__</b>, <b>__FILE__</b>, 
  1588. <b>__DATE__</b>, <b>__TIME__</b>, and <b>__STDC__</b>) are 
  1589. presented. Finally, macro <b>assert</b> of the <b>assert.h</b> header 
  1590. is discussed; <b>assert</b> is valuable in program testing, 
  1591. debugging, verification, and validation. We have used <br>
  1592.  
  1593. </page>
  1594. <page>
  1595. <b>assert</b> in many examples, but the reader is urged to 
  1596. begin using exception handling instead, as we 
  1597. introduced in Chapter 13.<br>
  1598. <font size=18><b>Chapter 18--C Legacy Code Topics--
  1599. </b></font><br>
  1600. presents additional topics including several advanced 
  1601. topics not ordinarily covered in introductory courses. 
  1602. We show how to redirect input to a program to come 
  1603. from a file, redirect output from a program to be placed 
  1604. in a file, redirect the output of one program to be the 
  1605. input of another program (piping), append the output of 
  1606. a program to an existing file, develop functions that use 
  1607. variable-length argument lists, pass command-line 
  1608. arguments to function <b>main</b> and use them in a program, <br>
  1609.  
  1610. </page>
  1611. <page>
  1612. compile programs whose components are spread across 
  1613. multiple files, register functions with <b>atexit</b> to be 
  1614. executed at program termination, terminate program 
  1615. execution with function <b>exit</b>, use the <b>const</b> and <b>volatile</b> 
  1616. type qualifiers, specify the type of a numeric constant 
  1617. using the integer and floating-point suffixes, use the 
  1618. signal handling library to trap unexpected events, create 
  1619. and use dynamic arrays with <b>calloc</b> and <b>realloc</b>, use 
  1620. <b>union</b>s as a space-saving technique, and use linkage 
  1621. specifications when C++ programs are to be linked with 
  1622. legacy C code. As the title suggests, this chapter is 
  1623. intended primarily for C++ programmers who will be 
  1624. working with C legacy code.<br>
  1625.  
  1626. </page>
  1627. <page>
  1628. <font size=18><b>Chapter 19--Class string and String Stream Processing--
  1629. </b></font><br>
  1630. The chapter also discusses C++'s capabilities for 
  1631. inputting data from strings in memory and outputting 
  1632. data to strings in memory; these capabilities are often 
  1633. referred to as in-core formatting or string-stream 
  1634. processing. This chapter is completely new. Class 
  1635. <b>string</b> is a required component of the Standard Library. 
  1636. Although we placed this material in a chapter near then 
  1637. end of the book, many instructors will want to 
  1638. incorporate the discussion of "strings as full-fledged 
  1639. objects" early in their courses. We preserved the 
  1640. treatment of C-like strings in Chapter 5 and later for <br>
  1641.  
  1642. </page>
  1643. <page>
  1644. several reasons. First, we feel it strengthens the reader's 
  1645. understanding of pointers. Second, we feel that for the 
  1646. next decade, or so, C++ programmers will need to be 
  1647. able to read and modify the enormous amounts of C 
  1648. legacy code that have accumulated over the last quarter 
  1649. of a century, and this code processes strings as pointers, 
  1650. as does a large portion of the C++ code that has been 
  1651. written in industry over the last many years. In Chapter 
  1652. 19 we discuss <b>string</b> assignment, concatenation and 
  1653. comparison. We show how to determine various <b>string</b> 
  1654. characteristics such as a <b>string</b>'s size, capacity and 
  1655. whether or not it is empty. We discuss how to resize a 
  1656. <b>string</b>. We consider the various <i>find</i> functions that <br>
  1657.  
  1658. </page>
  1659. <page>
  1660. enable us to find a substring in a <b>string</b> (searching the 
  1661. <b>string</b> either forwards or backwards), and we show how 
  1662. to find either the first occurrence or last occurrence of a 
  1663. character selected from a <b>string</b> of characters, and how 
  1664. to find the first occurrence or last occurrence of a 
  1665. character that is not included in a <b>string</b>. We show how 
  1666. to replace, erase and insert characters in a <b>string</b>. We 
  1667. show how to convert a <b>string</b> object to a C-style <b>char *</b> 
  1668. string.<br>
  1669. <font size=18><b>Chapter 20--Standard Template Library (STL)--
  1670. </b></font><br>
  1671. This chapter is completely new. It is a "feature chapter" 
  1672. of this edition, as should be clear from the prominence 
  1673. we have given STL on the cover. We emphasize here <br>
  1674.  
  1675. </page>
  1676. <page>
  1677. again that this is not an STL book, nor is there any 
  1678. discussion of actual STL features in the first 18 
  1679. chapters. Chapter 19 does make brief mention of 
  1680. iterators, but states that the real discussion of iterators is 
  1681. in Chapter 20. With the inclusion of Chapter 20, <i>C++ 
  1682. How to Program: Second Edition</i> now discusses four 
  1683. programming paradigms: procedural programming, 
  1684. object-based programming, object-oriented 
  1685. programming and generic programming (with STL). 
  1686. The challenges of teaching object-oriented 
  1687. programming will increase as class libraries and class 
  1688. template libraries grow. We believe that there will be 
  1689. exponential growth in reusable componentry over the <br>
  1690.  
  1691. </page>
  1692. <page>
  1693. next few decades. The early computer science 
  1694. curriculum will need to present the root language, 
  1695. indicate how to craft valuable classes, overview key 
  1696. existing class libraries, and show how to reuse these 
  1697. components. Upper-level computer science courses, 
  1698. and, in fact, courses in most any topic for which 
  1699. computers are used (i.e., today that means most any 
  1700. topic, period) will cover their bodies of knowledge and 
  1701. these will include discussion and use of the class 
  1702. libraries that apply to that subject area. Many efforts are 
  1703. underway to support reuse across platforms, so it will 
  1704. not matter what language your classes are written in, <br>
  1705.  
  1706. </page>
  1707. <page>
  1708. you will be able to reuse them from many different 
  1709. languages.<br>
  1710. <font size=18><b>Chapter 21--ANSI/ISO C++ Standard Language 
  1711. Additions-- 
  1712. </b></font><br>
  1713. This chapter is completely new. It is a collection of 
  1714. miscellaneous additions to the language. We discuss 
  1715. data type <b>bool</b> with data values <b>false</b> and <b>true</b>--a more 
  1716. natural representation than using non-zero and zero 
  1717. values (although these may still be used). We discuss 
  1718. the four new cast operators: <b>static_cast</b>, <b>const_cast</b>, 
  1719. <b>reinterpret_cast</b> and <b>dynamic_cast</b>. These provide a 
  1720. much more robust mechanism for dealing with casts 
  1721. than the style of casts C++ inherited from C. We discuss <br>
  1722.  
  1723. </page>
  1724. <page>
  1725. <b>namespaces</b>, a feature particularly crucial for software 
  1726. developers building substantial systems, especially 
  1727. when using a variety of class libraries. Namespaces 
  1728. prevent the kinds of naming collisions that previously 
  1729. hindered such large software efforts. We consider run-
  1730. time type information (RTTI) which allows programs to 
  1731. check the type of an object, something they could not 
  1732. do previously unless the programmer explicitly 
  1733. included a type code (an undesirable programming 
  1734. practice). We discuss the use of operators <b>typeid</b> and 
  1735. <b>dynamic_cast</b>. We discuss the new operator keywords; 
  1736. these are useful for programmers who do not like 
  1737. cryptic operators, but their primary use is in <br>
  1738.  
  1739. </page>
  1740. <page>
  1741. international markets where certain characters are not 
  1742. normally available on local keyboards. We consider the 
  1743. use of keyword <b>explicit</b> that prevents the compiler from 
  1744. invoking conversion constructors when it would be 
  1745. undesirable to do so; <b>explicit</b> conversion constructors 
  1746. can only be invoked through constructor syntax, not 
  1747. through implicit conversions. We discuss keyword 
  1748. <b>mutable</b>, which allows a member of a <b>const</b> object to 
  1749. be changed. Previously this was accomplished by 
  1750. "casting away <b>const</b>-ness," a dangerous practice. We 
  1751. also discuss a few features that are not new, but which 
  1752. we chose not to include in the main portion of the book, 
  1753. because they are relatively obscure, namely pointer-to-<br>
  1754.  
  1755. </page>
  1756. <page>
  1757. member operators <b>.*</b> and <b>->*</b> and using <b>virtual</b> base 
  1758. classes with multiple inheritance.<br>
  1759. newtitle
  1760. <b>Appendix A--Operator Precedence Chart--
  1761. </b>
  1762. <b><b>Appendix A--Operator Precedence Chart--
  1763. </b></b><br>
  1764. We have reformatted the table to be more useful. Each 
  1765. operator is now on a line by itself with the operator 
  1766. symbol, its name and its associativity.<br>
  1767. <font size=18><b>Appendix B--ASCII Character Set--
  1768. </b></font><br>
  1769. We resisted the temptation to expand this substantially 
  1770. to include the relatively new international Unicode 
  1771. character set. By the next edition, we expect to discuss 
  1772. Unicode in detail.<br>
  1773.  
  1774. </page>
  1775. <page>
  1776. <font size=18><b>Appendix C--Number Systems--
  1777. </b></font><br>
  1778. discusses the binary, octal, decimal and hexadecimal 
  1779. number systems. It considers how to convert numbers 
  1780. between bases and explains the one's complement and 
  1781. two's complement binary representations.<br>
  1782. <font size=18><b>Appendix D--C++ Internet and Web Resources--
  1783. </b></font><br>
  1784. contains a huge listing of valuable C++ resources such 
  1785. as demos, information about popular compilers 
  1786. (including freebies), books, articles, conferences, job 
  1787. banks, journals, magazines, help, tutorials, FAQs 
  1788. (frequently asked questions), newsgroups, copies of the 
  1789. ANSI/ISO C++ Draft Standard document, web-based 
  1790. courses, product news and C++ development tools.<br>
  1791.  
  1792. </page>
  1793. <page>
  1794. <font size=18><b>Bibliography--
  1795. </b></font><br>
  1796. lists 122 books and articles--some of historical interest 
  1797. and most quite recent--to encourage the student to do 
  1798. further reading on C++ and OOP.<br>
  1799. <font size=18><b>Index--
  1800. </b></font><br>
  1801. The book contains a comprehensive index to enable the 
  1802. reader to locate by keyword any term or concept 
  1803. throughout the text.<br>
  1804.  
  1805. </page>
  1806. </section>
  1807. <section type=Body name=Default title="The C & C++ Multimedia Cyber Classroom: Second Edition">
  1808. <page>
  1809. <font size=18 bold>The C & C++ Multimedia Cyber Classroom: 
  1810. Second Edition</font><hr>
  1811. We have implemented an interactive, CD-ROM-based, 
  1812. software version of <i>C++ How to Program: Second 
  1813. Edition </i>called the <i>C & C++ Multimedia Cyber 
  1814. Classroom: Second Edition. </i>It is loaded with features 
  1815. for learning and reference. The <i>Cyber Classroom</i> is 
  1816. wrapped with the textbook in a publication called <i>The 
  1817. Complete C++ Training Course: Second Edition</i>. If 
  1818. you have already purchased the textbook, you can get a 
  1819. copy of the<i> C & C++ Multimedia Cyber Classroom</i> CD <br>
  1820.  
  1821. </page>
  1822. <page>
  1823. directly from Prentice Hall. Please see the ordering 
  1824. instructions on the last few pages of this book.<br>
  1825. <spacer width=16 height=1>There is an introductory video with the authors 
  1826. overviewing the Cyber Classroom's features. The 248 
  1827. live-code example C++ programs in the textbook truly 
  1828. "come alive" in the <i>C & C++ Multimedia Cyber 
  1829. Classroom</i>. We have placed executables for all these 
  1830. examples "under the hood" of the <i>C & C++ 
  1831. Multimedia Cyber Classroom</i>, so if you are viewing a 
  1832. program and want to execute it, you simply click on the 
  1833. lightning bolt icon and the program will run. You will 
  1834. immediately see--and hear (for the audio-based 
  1835. multimedia programs)--the program's outputs. If you <br>
  1836.  
  1837. </page>
  1838. <page>
  1839. want to modify a program and see the effects of your 
  1840. changes, simply click on the floppy-disk icon that 
  1841. causes the source code to be "lifted off" the CD and 
  1842. "dropped into" one of your own directories so you can 
  1843. edit the text, recompile the program and try out your 
  1844. new version. Click on the audio icon and Paul Deitel 
  1845. will talk about the program and "walk you through" the 
  1846. code. (You will not hear Harvey Deitel's voice in these 
  1847. audios--our friends at Prentice Hall like Paul's voice 
  1848. better!) <br>
  1849. <spacer width=16 height=1>The <i>C & C++ Multimedia Cyber Classroom</i> provides 
  1850. various navigational aids including extensive 
  1851. hyperlinking. The <i>C & C++ Multimedia Cyber 
  1852. </i><br>
  1853.  
  1854. </page>
  1855. <page>
  1856. <i>Classroom</i> remembers in a "history list" recent sections 
  1857. you have visited and allows you to move forward or 
  1858. backward in that history list. The thousands of index 
  1859. entries are hyperlinked to their text occurrences. You 
  1860. can key in a term and the <i>C & C++ Multimedia Cyber 
  1861. Classroom</i> will locate its occurrences throughout the 
  1862. text. The <i>Table of Contents</i> entries are "hot," so clicking 
  1863. on a chapter or section name immediately takes you to 
  1864. that chapter or section. You can insert "bookmarks" at 
  1865. places to which you may want to return. You can even 
  1866. add "notes" just as you would in the margin of a 
  1867. textbook.<br>
  1868.  
  1869. </page>
  1870. <page>
  1871. These second edition Cyber Classrooms have been 
  1872. completely reprogrammed in Java to run on multiple 
  1873. platforms. Windows(tm) 95, Windows NT(tm) and 
  1874. Solaris(tm) are currently compatible, and Macintosh\xa8  
  1875. OS/8 is expected to be supported later in 1998.<br>
  1876. <spacer width=16 height=1>Students and professional users of our <i>Cyber 
  1877. Classrooms</i> tell us they like the interactivity and that 
  1878. the <i>Cyber Classroom</i> is an effective reference because 
  1879. of the extensive hyperlinking and other navigational 
  1880. features. We recently had an email from a person who 
  1881. said that he lives "in the boonies" and cannot take a live <br>
  1882.  
  1883. </page>
  1884. <page>
  1885. course at a college, so the <i>Cyber Classroom</i> was a nice 
  1886. solution to his educational needs.<br>
  1887. <spacer width=16 height=1>Professors have sent us emails indicating their students 
  1888. enjoy using the <i>Cyber Classroom</i>, spend more time on 
  1889. the course and master more of the material than in 
  1890. textbook-only courses. Also, the <i>Cyber Classroom</i> 
  1891. helps shrink lines outside professors' offices during 
  1892. office hours. We have also published the <i>Java 
  1893. Multimedia Cyber Classroom</i> and hope to publish 
  1894. <i>Cyber Classroom</i> editions of our forthcoming 
  1895. Microsoft-related <i>Visual Basic</i>(r)<i> How to Program,</i> <br>
  1896.  
  1897. </page>
  1898. <page>
  1899. <i>Visual C++</i>(r)<i> How to Program and Visual J++</i>(tm)<i> 
  1900. How to Program </i>textbooks.<br>
  1901.  
  1902. </page>
  1903. </section>
  1904. <section type=Body name=Default title="Acknowledgments">
  1905. <page>
  1906. <font size=18 bold>Acknowledgments</font><hr>
  1907. One of the great pleasures of writing a textbook is 
  1908. acknowledging the efforts of many people whose 
  1909. names may not appear on the cover, but whose hard 
  1910. work, cooperation, friendship, and understanding were 
  1911. crucial to the production of the book.<br>
  1912. <spacer width=16 height=1>Three other people at Deitel & Associates, Inc. devoted 
  1913. long hours to this project. We would like to 
  1914. acknowledge the efforts of Tem Nieto, Barbara Deitel 
  1915. and Abbey Deitel. <br>
  1916. <spacer width=16 height=1>Tem Nieto, a graduate of the Massachusetts Institute of 
  1917. Technology, is one of our full-time colleagues at Deitel <br>
  1918.  
  1919. </page>
  1920. <page>
  1921. & Associates, Inc. Tem teaches C++, C and Java 
  1922. seminars and works with us on textbook writing, course 
  1923. development and multimedia authoring efforts. He is 
  1924. co-authoring our forthcoming book, <i>Visual Basic How 
  1925. to Program</i>. Tem co-authored Chapter 19, Chapter 21 
  1926. and the Special Section entitled "Building Your Own 
  1927. Compiler" in Chapter 15. He also contributed to the 
  1928. Instructor's Manual and the<i> C & C++ Multimedia 
  1929. Cyber Classroom: Second Edition</i>.<br>
  1930. <spacer width=16 height=1>Barbara Deitel managed the preparation of the 
  1931. manuscript and coordinated with Prentice Hall all the 
  1932. efforts related to production of the book. Barbara's 
  1933. efforts are by far the most painstaking of what we do to <br>
  1934.  
  1935. </page>
  1936. <page>
  1937. develop books. She has infinite patience. She handled 
  1938. the endless details involved in publishing a 1200-page, 
  1939. two-color book; a 500-page instructor's manual and the 
  1940. 650 megabyte CD <i>C & C++ Multimedia Cyber 
  1941. Classroom.</i> She used FrameMaker page-layout 
  1942. software to prepare the book. Barbara mastered this 
  1943. complex software package and did a marvelous job 
  1944. giving the book its clean style. She spent long hours 
  1945. researching the quotations at the beginning of each 
  1946. chapter. She prepared every one of the 7800 page 
  1947. references in the 39-page index. She did all this in 
  1948. parallel with handling her extensive financial and <br>
  1949.  
  1950. </page>
  1951. <page>
  1952. administrative responsibilities at Deitel & Associates, 
  1953. Inc. <br>
  1954. <spacer width=16 height=1>Abbey Deitel, a graduate of Carnegie Mellon 
  1955. University's industrial management program, and now 
  1956. Chief Operating Officer and Director of Worldwide 
  1957. Marketing at Deitel & Associates, Inc., wrote Appendix 
  1958. D and suggested the title for the book. We asked Abbey 
  1959. to surf the World Wide Web and track down the best 
  1960. C++ sites. She used every major Web search engine and 
  1961. collected this information for you in Appendix D. For 
  1962. each resource and demo, Abbey has provided a brief 
  1963. explanation. She rejected hundreds of sites and has 
  1964. listed for you the best she could find. Abbey will be <br>
  1965.  
  1966. </page>
  1967. <page>
  1968. keeping this resources and demos listing on our Web 
  1969. site <b>http://www.deitel.com</b>. She asks that you send 
  1970. URLs for your favorite sites to her by email at 
  1971. <b>deitel@deitel.com</b> and she will post links to these on 
  1972. our site.<br>
  1973. <spacer width=16 height=1>We are fortunate to have been able to work on this 
  1974. project with a talented and dedicated team of publishing 
  1975. professionals at Prentice Hall. This book happened 
  1976. because of the encouragement, enthusiasm, and 
  1977. persistence of our computer science editor, Laura 
  1978. Steele, and her boss--the best friend we have had in 22 
  1979. years of publishing--Marcia Horton, Editor-in-Chief of 
  1980. Prentice-Hall's Engineering and Computer Science <br>
  1981.  
  1982. </page>
  1983. <page>
  1984. Division. Camille Trentacoste did a marvelous job as 
  1985. production manager. <br>
  1986. <spacer width=16 height=1>The <i>C & C++ Multimedia Cyber Classroom: Second 
  1987. Edition </i>was developed in parallel with <i>C++ How to 
  1988. Program: Second Edition</i>. We sincerely appreciate the 
  1989. "new media" insight, savvy and technical expertise of 
  1990. our editor Mark Taub. He did a remarkable job bringing 
  1991. the <i>C & C++ Multimedia Cyber Classroom: Second 
  1992. Edition,</i> to publication under a tight schedule. Mark is 
  1993. surely one of the world's leaders in new-media 
  1994. publishing. We also want to thank Logan Campbell, 
  1995. President of the Prentice Hall Professional and <br>
  1996.  
  1997. </page>
  1998. <page>
  1999. Technical Reference Division, for making impressive 
  2000. resources available to our projects.<br>
  2001. <spacer width=16 height=1>We owe special thanks to the creativity of Tamara 
  2002. Newnam Cavallo who did the art work for our 
  2003. programming tips icons and the cover. She created the 
  2004. delightful creature who shares with you the book's 
  2005. programming tips. Please help us name this endearing 
  2006. little bug. Some early suggestions: D. Bug, InterGnat, 
  2007. DeetleBug (an unfortunate moniker that was attached to 
  2008. the old guy in high school) and Feature (It's not a bug, 
  2009. it's a feature"). <br>
  2010.  
  2011. </page>
  2012. <page>
  2013. We sincerely appreciate the efforts of our reviewers 
  2014. (some first edition, some second edition, and some 
  2015. both):<br>
  2016. <font size=6><br></font><indent width=16><font size=14><i>Richard Albright (University of Delaware) </i></font></indent><font size=6><br></font>
  2017. <font size=6><br></font><indent width=16><font size=14><i>Ken Arnold (Sun Microsystems)</i></font></indent><font size=6><br></font>
  2018. <font size=6><br></font><indent width=16><font size=14><i>Ian Baker (Microsoft) </i></font></indent><font size=6><br></font>
  2019. <font size=6><br></font><indent width=16><font size=14><i>Pete Becker (Member of ANSI/ISO C++ Committee; Dinkumware, LTD.)</i></font></indent><font size=6><br></font>
  2020. <font size=6><br></font><indent width=16><font size=14><i>Timothy D. Born (Delta C-Fax) </i></font></indent><font size=6><br></font>
  2021. <font size=6><br></font><indent width=16><font size=14><i>John Carson (George Washington University) </i></font></indent><font size=6><br></font>
  2022. <font size=6><br></font><indent width=16><font size=14><i>Steve Clamage (Chairman of ANSI/ISO C++ Standards 
  2023. Committee; Sunsoft)</i></font></indent><font size=6><br></font>
  2024.  
  2025. </page>
  2026. <page>
  2027. <font size=6><br></font><indent width=16><font size=14><i>Marian Corcoran (Member ANSI/ISO C++ Standards 
  2028. Committee)</i></font></indent><font size=6><br></font>
  2029. <font size=6><br></font><indent width=16><font size=14><i>Edgar Crisostomo (Siemens/Rolm) </i></font></indent><font size=6><br></font>
  2030. <font size=6><br></font><indent width=16><font size=14><i>David Finkel (Worcester Polytechnic Institute)</i></font></indent><font size=6><br></font>
  2031. <font size=6><br></font><indent width=16><font size=14><i>Rex Jaeschke (Chairman, ANSI/ISO C Committee)</i></font></indent><font size=6><br></font>
  2032. <font size=6><br></font><indent width=16><font size=14><i>Frank Kelbe (Naval Postgraduate School) </i></font></indent><font size=6><br></font>
  2033. <font size=6><br></font><indent width=16><font size=14><i>Chris Kelsey (Kelsey Associates) </i></font></indent><font size=6><br></font>
  2034. <font size=6><br></font><indent width=16><font size=14><i>Don Kostuch (You Can C Clearly Now)</i></font></indent><font size=6><br></font>
  2035. <font size=6><br></font><indent width=16><font size=14><i>Meng Lee (Co-creator of STL; Hewlett-Packard)</i></font></indent><font size=6><br></font>
  2036. <font size=6><br></font><indent width=16><font size=14><i>Barbara Moo (AT&T Bell Labs) </i></font></indent><font size=6><br></font>
  2037. <font size=6><br></font><indent width=16><font size=14><i>David Papurt (Consultant)</i></font></indent><font size=6><br></font>
  2038.  
  2039. </page>
  2040. <page>
  2041. <font size=6><br></font><indent width=16><font size=14><i>Wolfgang Pelz (University of Akron) </i></font></indent><font size=6><br></font>
  2042. <font size=6><br></font><indent width=16><font size=14><i>Jandelyn Plane (University of Maryland College Park) </i></font></indent><font size=6><br></font>
  2043. <font size=6><br></font><indent width=16><font size=14><i>Paul Power (Borland) </i></font></indent><font size=6><br></font>
  2044. <font size=6><br></font><indent width=16><font size=14><i>Kenneth Reek (Rochester Institute of Technology)</i></font></indent><font size=6><br></font>
  2045. <font size=6><br></font><indent width=16><font size=14><i>Larry Rosler (Hewlett-Packard) </i></font></indent><font size=6><br></font>
  2046. <font size=6><br></font><indent width=16><font size=14><i>Robin Rowe (Halycon/Naval Postgraduate School)</i></font></indent><font size=6><br></font>
  2047. <font size=6><br></font><indent width=16><font size=14><i>Brett Schuchert (ObjectSpace; Co-Authored <i>STL Primer</i>) </i></font></indent><font size=6><br></font>
  2048. <font size=6><br></font><indent width=16><font size=14><i>Alexander Stepanov (Co-creator of STL; Silicon Graphics) </i></font></indent><font size=6><br></font>
  2049. <font size=6><br></font><indent width=16><font size=14><i>William Tepfenhart (AT&T; Author <i>UML and C++: A 
  2050. Practical Guide to Object-Oriented Development</i>)</i></font></indent><font size=6><br></font>
  2051.  
  2052. </page>
  2053. <page>
  2054. <font size=6><br></font><indent width=16><font size=14><i>David Vandevoorde (Member of the ANSI/ISO C++ 
  2055. Committee; HewlettPackard)</i></font></indent><font size=6><br></font>
  2056. <font size=6><br></font><indent width=16><font size=14><i>Terry Wagner (University of Texas) </i></font></indent><font size=6><br></font>
  2057. Under tight deadlines, they scrutinized every aspect of 
  2058. the text and made countless suggestions for improving 
  2059. the accuracy and completeness of the presentation.<br>
  2060. <spacer width=16 height=1>We would sincerely appreciate your comments, 
  2061. criticisms, corrections, and suggestions for improving 
  2062. the text. Please send your suggestions for improving 
  2063. and adding to our list of <i>Good Programming Practices, 
  2064. Common Programming Errors, Performance Tips, 
  2065. Portability Tips,</i> <i>Software Engineering Observations</i>, <br>
  2066.  
  2067. </page>
  2068. <page>
  2069. and <i>Testing and Debugging Tips. </i>Please address all 
  2070. correspondence to our email address:<br>
  2071. <font size=2><br></font><font size=11><pre>
  2072. deitel@deitel.com<p>
  2073. </pre></font>
  2074. or write to us as follows:<br>
  2075. <font size=6><br></font><indent width=16><font size=14><i>Harvey M. Deitel (author)</i></font></indent><font size=6><br></font>
  2076. <font size=6><br></font><indent width=16><font size=14><i>Paul J. Deitel (author)</i></font></indent><font size=6><br></font>
  2077. <font size=6><br></font><indent width=16><font size=14><i>c/o Computer Science Editor, ESM</i></font></indent><font size=6><br></font>
  2078. <font size=6><br></font><indent width=16><font size=14><i>Prentice Hall</i></font></indent><font size=6><br></font>
  2079. <font size=6><br></font><indent width=16><font size=14><i>1 Lake Street</i></font></indent><font size=6><br></font>
  2080. <font size=6><br></font><indent width=16><font size=14><i>Upper Saddle River, NJ 07458</i></font></indent><font size=6><br></font>
  2081.  
  2082. </page>
  2083. <page>
  2084. We will respond immediately. Well, that's it for now. 
  2085. Welcome to the exciting world of C++, object-oriented 
  2086. programming and generic programming with STL. We 
  2087. hope you enjoy this look at contemporary computer 
  2088. programming. Good luck!<br>
  2089. <font size=6><br></font><indent width=16><font size=14><i>Dr. Harvey M. Deitel</i></font></indent><font size=6><br></font>
  2090. <font size=6><br></font><indent width=16><font size=14><i>Paul J. Deitel</i></font></indent><font size=6><br></font>
  2091.  
  2092. </page>
  2093. </section>
  2094. <section type=Body name=Default title="About the Authors">
  2095. <page>
  2096. <font size=18 bold>About the Authors</font><hr>
  2097. <b>Dr. Harvey M. Deitel</b>, CEO of Deitel & Associates, 
  2098. Inc., has 36 years experience in the computing field 
  2099. including extensive industry and academic experience. 
  2100. He is one of the world's leading computer science 
  2101. instructors and seminar presenters. Dr. Deitel earned 
  2102. B.S. and M.S. degrees from the Massachusetts Institute 
  2103. of Technology and a Ph.D. from Boston University. He 
  2104. worked on the pioneering virtual memory operating 
  2105. systems projects at IBM and MIT that developed 
  2106. techniques widely implemented today in systems like 
  2107. UNIX(r), Windows NT(tm) and OS/2. He has 20 years of <br>
  2108.  
  2109. </page>
  2110. <page>
  2111. college teaching experience including earning tenure 
  2112. and serving as the Chairman of the Computer Science 
  2113. Department at Boston College before founding Deitel 
  2114. & Associates, Inc. with Paul J. Deitel. He is author or 
  2115. co-author of several dozen books and multimedia 
  2116. packages and is currently writing five more. With 
  2117. translations published in Japanese, Russian, Spanish, 
  2118. Elementary Chinese, Advanced Chinese, Korean, and 
  2119. French, the Deitels' texts have earned international 
  2120. recognition.<br>
  2121. <spacer width=16 height=1><b>Paul J. Deitel</b>, Executive Vice President of Deitel & 
  2122. Associates, Inc., is a graduate of the Massachusetts 
  2123. Institute of Technology's Sloan School of Management <br>
  2124.  
  2125. </page>
  2126. <page>
  2127. where he studied Information Technology. Through 
  2128. Deitel & Associates, Inc. he has delivered Java, C and 
  2129. C++ courses for industry clients including Digital 
  2130. Equipment Corporation, Sun Microsystems, White 
  2131. Sands Missile Range, Rogue Wave Software, Software 
  2132. 2000, Computervision, Stratus, Fidelity, Cambridge 
  2133. Technology Partners, Open Environment Corporation, 
  2134. One Wave, Hyperion Software, Lucent Technologies, 
  2135. Adra Systems, Entergy, CableData Systems, NASA at 
  2136. the Kennedy Space Center, the National Severe Storm 
  2137. Center, IBM and many other organizations. He has 
  2138. lectured on C++ and Java for the Boston Chapter of the 
  2139. Association for Computing Machinery. He teaches <br>
  2140.  
  2141. </page>
  2142. <page>
  2143. satellite-based Java courses through a cooperative 
  2144. venture of Deitel & Associates, Inc., Prentice Hall and 
  2145. the Technology Education Network. He is the co-author 
  2146. of ten books and multimedia packages with Harvey 
  2147. Deitel and is currently writing five more.<br>
  2148. <spacer width=16 height=1>The Deitels are co-authors of the world's best-selling 
  2149. introductory college computer science textbooks, <i>C 
  2150. How to Program</i>, <i>C++ How to Program</i> and <i>Java How 
  2151. to Program</i>. The Deitels are also co-authors of the C & 
  2152. C++ Multimedia Cyber Classroom--Prentice Hall's 
  2153. first multimedia-based textbook--and the <i>Java 
  2154. Multimedia Cyber Classroom</i>. Each of these textbooks 
  2155. and <i>Cyber Classrooms</i> is in its second edition.<br>
  2156.  
  2157. </page>
  2158. </section>
  2159. <section type=Body name=Default title="About Deitel & Associates, Inc.">
  2160. <page>
  2161. <font size=18 bold>About Deitel & Associates, Inc.</font><hr>
  2162. Deitel & Associates, Inc. is a rapidly growing, 
  2163. internationally recognized corporate training and 
  2164. publishing organization specializing in programming 
  2165. languages and object technology education. The 
  2166. company provides courses on C++, Java, C, Visual 
  2167. Basic, and Object-Oriented Analysis and Design. The 
  2168. principals of Deitel & Associates, Inc. are Dr. Harvey 
  2169. M. Deitel and Paul J. Deitel. The company's clients 
  2170. include some of the world's largest computer 
  2171. companies, government agencies and business 
  2172. organizations. Through its publishing partnership with <br>
  2173.  
  2174. </page>
  2175. <page>
  2176. Prentice Hall, Deitel & Associates, Inc. publishes 
  2177. leading-edge programming textbooks and professional 
  2178. books, interactive CD-ROM-based multimedia <i>Cyber 
  2179. Classrooms </i>and satellite courses. The company will 
  2180. soon begin publishing videotape courses and World-
  2181. Wide-Web-based courses. Deitel & Associates, Inc. and 
  2182. the authors can be reached via email at <br>
  2183. <font size=2><br></font><font size=11><pre>
  2184. deitel@deitel.com<p>
  2185. </pre></font>
  2186. To learn more about Deitel & Associates, Inc. and its 
  2187. on-site course curriculum, visit:<br>
  2188. <font size=2><br></font><font size=11><pre>
  2189. http://www.deitel.com<p>
  2190. </pre></font>
  2191.  
  2192. </page>
  2193. <page>
  2194. To learn more about Deitel/Prentice Hall publications, 
  2195. visit:<br>
  2196. <font size=2><br></font><font size=11><pre>
  2197. http://www.prenhall.com/deitel<p>
  2198. </pre></font>
  2199. For a current list of Deitel/Prentice Hall publications 
  2200. including textbooks and multimedia packages, and for 
  2201. complete worldwide ordering information, please see 
  2202. the last few pages of this book.<br>
  2203. <br>
  2204.  
  2205. </page>
  2206. </section>
  2207.  
  2208. <section type=Popup name=Quotes title="Quotes">
  2209. <page>
  2210. This chapter does not contain any Quotes.
  2211. </page>
  2212. </section>
  2213. <section type=Popup name=Answers title="Answers">
  2214. <page>
  2215. This chapter does not contain any Answers to Exercises.
  2216. </page>
  2217. </section>
  2218. <section type=Popup name=Debug title="Testing">
  2219. <page>
  2220. This chapter does not contain any Testing and Debugging tips.
  2221. </page>
  2222. </section>
  2223. <section type=Popup name=Terminology title="Terminology">
  2224. <page>
  2225. This chapter does not contain any Terminology links.
  2226. </page>
  2227. </section>
  2228. <section type=Popup name=Portable title="Portability">
  2229. <page>
  2230. This chapter does not contain any Portability tips.
  2231. </page>
  2232. </section>
  2233. <section type=Popup name=Illustration title="Illustrations">
  2234. <page>
  2235. This chapter does not contain any Illustrations.
  2236. </page>
  2237. </section>
  2238. <section type=Popup name=AppletPopup title="Applet Examples">
  2239. <page>
  2240. This chapter does not contain any Applet Examples.
  2241. </page>
  2242. </section>
  2243. <section type=Popup name=Perform title="Performance">
  2244. <page>
  2245. This chapter does not contain any Performance tips.
  2246. </page>
  2247. </section>
  2248. <section type=Popup name=Practice title="Good Practices">
  2249. <page>
  2250. This chapter does not contain any Good Programming Practices tips.
  2251. </page>
  2252. </section>
  2253. <section type=Popup name=Objective title="Objectives">
  2254. <page>
  2255. This chapter does not contain any Objectives.
  2256. </page>
  2257. </section>
  2258. <section type=Popup name=Code title="Code Examples">
  2259. <page>
  2260. This chapter does not contain any Code Examples.
  2261. </page>
  2262. </section>
  2263. <section type=Popup name=Exercises title="Exercises">
  2264. <page>
  2265. This chapter does not contain any Exercises.
  2266. </page>
  2267. </section>
  2268. <section type=Popup name=Engineer title="Engineering">
  2269. <page>
  2270. This chapter does not contain any Software Engineering Observations.
  2271. </page>
  2272. </section>
  2273. <section type=Popup name=Errors title="Common Errors">
  2274. <page>
  2275. This chapter does not contain any Common Errors tips.
  2276. </page>
  2277. </section>
  2278. </chapter>
  2279. </html>
  2280. </html>
  2281.